Skip to main content

Roles

A role is a named group of end users inside a guard, such as customer, manager, or admin. Every guard starts with one system role: Create more roles in Authentication → Guards → your guard → Roles. A user can have several roles; their access is the union of all their roles.

Assign roles

  • One user: open the role → Assign → pick the user’s record.
  • Many users: edit the role’s assignments to set the full list at once.
  • Remove: Revoke the role from the user.
Role IDs are copied into the access token at login. Bludia checks current roles on every request, but clients should refresh the session to see updated roles claims.

Collection permissions

For each role and collection, switch on the actions the role may perform: Missing permissions are false. Removing a role’s permissions for a collection blocks that role from it entirely.

Example: a CRM

Combine with row-level security so reps only see their own deals while managers see everyone’s.

Denied requests

Status 403. Hide actions in your UI that a user’s roles don’t allow.

Tips

Give the default user role only what every new user needs. Grant more through extra roles.
billing_admin is clearer and easier to manage than ahmed_access.
Never let end users assign roles to themselves. Assign roles in the dashboard or from a trusted server.