Skip to content
BENIBIX Learn

Role-Based Access Control (RBAC)

Development🔑 AuthAuthorization

Also known as RBAC, User Roles, Roles and Permissions

Each role, like admin or editor, gets a set of rights. Then people get roles.

Think of it like

Think of it like badges at a school. Teachers, pupils and guests can each go to different rooms.

Example

Lucy's blog has three roles. Writers can draft posts, editors can publish them, and only the admin can add new users.

Why it matters

It keeps permissions tidy as a team grows. Hundreds of people can be managed with a handful of roles.

Definition

Role-based access control gives rights to roles, then gives roles to people. A role might be admin, editor or viewer. Each role has a list of things it may do, like edit posts or delete users. When someone changes jobs, you change their role, not dozens of rights. Most business apps work this way.

Common mistake

Giving everyone the admin role to save time. Then one stolen admin login can wreck it all.

Key takeaways

  1. 1
    Permissions to roles. Roles to people.
  2. 2
    Few roles. Admin, editor, viewer.
  3. 3
    Change the role. Not each permission.

Compare