Book a 30-min callBook a call

What is RBAC? Role-based access control for web apps

Role-based access control gives users permissions through roles such as admin, editor and viewer. How it works, how to design roles, and common mistakes.

Three user figures holding different keys, each key opening a different set of doors.
Written by
BYD Tech
Updated
Topic
Web apps
Reading time
3 min read

Questions people ask

What is role-based access control?

A way of controlling what users can do by giving permissions to roles, such as admin or viewer, and then assigning roles to users.

What is the difference between RBAC and ABAC?

RBAC decides by the user’s role. ABAC decides by attributes of the user, the item and the context, which allows finer rules but is more complex.

Where should permission checks happen?

On the server, for every request. Hiding buttons in the interface helps usability but does not protect anything on its own.

How many roles should an app have?

As few as match how customers work, often owner, admin, member and viewer. Add more, or custom roles, when customers clearly need them.

Building something like this?