Roles and permissions: decide who can open which part of the admin
Describes PhoenixKit 3.5.0.
A role is a named set of permissions. Give someone a role and they can open the parts of the admin that role allows. PhoenixKit has three built-in roles and lets you add your own.
Where to find it
In the admin sidebar, under Users: Roles (/admin/users/roles) lists the roles, and Permissions (/admin/users/permissions) shows every role against every permission in one table. Both need a role with the Users permission.
The built-in roles
- Owner: always has full access. It can’t be edited, deleted or handed out by hand; it is set when the site is first set up.
- Admin: the staff role. Only an Owner can change the Admin role’s permissions.
- User: the role an ordinary account has.
These three are marked System Role and Protected: you can’t edit or delete them. Every other role is a Custom Role.
The Roles page
The Roles page.
The table shows each role’s name, Type, Description and how many Users have it. The arrows (Move up, Move down) set the order of roles. That order is used wherever a user’s roles are listed, and by the role switcher: each sign-in starts in the first role the user holds.
Create New Role asks for a Role Name (unique, 1 to 50 characters) and an optional Description (up to 500 characters). Create Role saves it; it has no permissions until you give it some.
A custom role’s Role actions menu offers:
- Edit: change the Name shown to people and the description. The name the code uses can’t change; the dialog shows it. When the site has several languages, you can enter the name in each.
- Delete: asks first. A role still given to users can’t be deleted, and you can only delete a role whose permissions you hold yourself.
- Permissions: opens the permissions editor for that role.
Role Statistics under the table counts System Roles, Custom Roles and Total Roles.
Giving a role permissions
Permissions in a role’s menu opens Permissions for that role. The checkboxes are grouped into Core Sections (such as Dashboard, Users, Media, Settings, Modules, Jobs), Feature Modules (one per enabled module) and Custom (permissions your developers added). Grant All and Revoke All tick or untick everything you are allowed to change. Save Permissions stores the choice.
Some modules have finer permissions under their main one, shown indented. Granting one of those also grants the module itself, and taking the module away removes them too. Core has a few of its own:
- Media: See everyone’s files and Manage storage.
- Jobs: Manage jobs (start, pause, resume, cancel and retry).
- Settings: Security settings (sign-in methods, website access, registration and the new-user default role).
Permissions for modules that are switched off are not shown, but they are kept when you save.
The Permissions page
The permissions matrix has one row per permission and one column per role. Click a check or a cross to grant or revoke that permission for that role; the change is saved at once. The Full Access row is a single grant that gives a role everything, including modules added later. The Total row counts how many of the shown permissions each role has.
As the help box on the page says: the Owner role always has full access and can’t be changed, you can’t edit permissions for your own role or for roles with higher authority, and you can only grant or revoke permissions your own role has.
The Permissions matrix: every role's access in one table.
Who may hand out a role
An Owner may give or take away any role except Owner. Anyone else may only hand out a role that is neither Owner nor Admin and whose every permission they hold themselves. Nobody but an Owner changes their own roles.
What it doesn’t do
- A permission opens a part of the admin; it doesn’t turn a module on. A module that is off is hidden from everyone, Owner included, until it is enabled on the Modules page.
- Some permissions are not given to Admin automatically and an Owner grants them by hand, among them the API and personal API key permissions.