Chapter 4 — Users, roles and permissions
Module code: ADMIN
Features: user_mgmt, role_mgmt
This chapter explains how access is controlled. It is the chapter administrators read most often, because almost every "I cannot see the screen" question is answered here.
4.1 How permission works, in one page
Access is decided at three levels.
┌──────────────────────────────────────────┐
│ MODULE e.g. INVENTORY │
│ │ │
│ ├── FEATURE item_catalog │
│ │ └── rights: view create edit │
│ │ delete import export │
│ │ approve │
│ ├── FEATURE stock_operations │
│ └── FEATURE inventory_reports │
└──────────────────────────────────────────┘
- Module — a broad app area, such as
INVENTORY,HRorSCHOOL. - Feature — a group of screens inside it, such as
item_catalog. - Rights — what you may do with that feature:
| Right | Allows |
|---|---|
| View | Open the screen and read records. Without this, the menu item is hidden entirely. |
| Create | Add new records |
| Edit | Change existing records |
| Delete | Remove or archive records |
| Import | Bulk upload |
| Export | Download to CSV, Excel or PDF |
| Approve | Authorise documents that need approval |
View is the gate. If a user lacks view on a feature, the menu item does not appear and the URL is refused even if typed directly. This is deliberate: hiding the menu alone would not be security.
Scope
On top of the rights, a permission can be limited by scope:
| Scope | Effect |
|---|---|
| Companies | Only records belonging to the listed companies |
| Departments | Only records in the listed departments |
| Employee types | Only the listed employee categories |
| Own data only | Only records belonging to the signed-in user |
Own data only is what makes a self-service account safe: an employee can see their own attendance and payslips and nobody else's.
Two ways to grant
| Method | Use it when |
|---|---|
| Role | Normal practice. A role is a named bundle of permissions given to many users. Change the role once and every holder changes with it. |
| Direct user permission | Exception handling. One person needs one extra thing. Use sparingly — direct grants are invisible in the role list and are the usual cause of "why can he do that?" |
Rights from all a user's active roles, plus any direct grants, are added together. There is no "deny" — a user has a right if any source gives it.
Superusers bypass all of this and can see everything. Keep the number of superusers small.
4.2 Creating a user
Screen: /users/ → Create, or /users/enhanced-create/ for the guided form.
- Go to
/users/and select Create user. - Enter:
- Username — used to sign in. It cannot be changed later, so agree a
convention first (
firstname.lastnameworks well). - Email — where the activation link goes. Required. - First and last name. - Company and department if the form offers them. - Choose how the password is set: - Send activation link (recommended) — the user chooses their own password from the emailed link. You never see or hold their password. - Set a password now — for cases where email is not available. Tell the user to change it at first sign-in.
- Assign at least one role. A user with no role can sign in but sees an empty home screen.
- Link an employee record if this person is an employee. This link is what turns on their attendance, leave and payslip screens. Without it, HR self-service is simply absent for them.
- Save.
Re-sending an activation link
If the user never received or already used the link, open /users/<id>/ and select
Send activation link again. The previous link stops working.
Activating and deactivating
/users/<id>/deactivate/blocks sign-in immediately. The account and its history remain./users/<id>/activate/restores it.
Always deactivate rather than delete when someone leaves. Their name must remain attached to the documents they created.
4.3 Creating a role
Screen: /role-management/
- Go to
/role-management/and select Create role. - Enter: - Name — what the role does, from the user's point of view: Warehouse Supervisor, Accounts Officer, Class Teacher. - Code — a short unique identifier. - Description — write down what the role is for. Six months later this is what stops the role drifting.
- Save. The role now exists with no permissions.
- Open Permissions on the role (
/role-management/<id>/permissions/). - You are shown a grid of every module and feature with a tick box per right. Tick what the role needs.
- Save permissions.
Practical advice on designing roles
- Start from the job, not the screen. List what the person must accomplish, then tick the minimum that allows it.
- Give view first, then add. It is easier to add a missing right on request than to discover months later that everyone can delete invoices.
- Do not build one role per person. If you have forty roles for forty users, the system is being used as direct permissions with extra steps.
- Approve is not edit. A person who may approve a purchase order usually should not be able to edit it. Keeping these separate is the control.
Assigning a role to a user
Either direction works:
- From the user:
/users/<id>/→ Assign role. - From the role:
/role-management/<id>/users/→ add users. - In bulk:
/role-management/user-assignments/.
When assigning, you may set the scope — restricting the role to particular companies or departments for that user only.
4.4 Direct user permissions
Screen: /users/<id>/advanced-permissions/
Use this only for genuine exceptions. The screen shows the same module/feature grid as a role, but the grants apply to this one user.
To see the result of roles plus direct grants, use
/users/<id>/effective-permissions/. This is the screen to open when someone reports
unexpected access — it shows what the user actually has, and where each right came
from.
4.5 The authorisation screen
Screen: /authorization/
A single list of users with their status and permission summary, for reviewing access across the workspace rather than one user at a time. Use it for periodic access reviews: sort by role, confirm each person still needs what they hold, and deactivate leavers.
4.6 Menu management
Screen: /administration/menu/
The sidebar menu is data, not code, so it can be adapted to how your organisation talks about its work.
| Action | Screen |
|---|---|
| List and reorder menu items | /administration/menu/ |
| Add an item | /administration/menu/new/ |
| Edit an item | /administration/menu/<id>/edit/ |
| Move an item up/down or to another parent | drag, or /administration/menu/<id>/move/ |
| Export the whole menu to a file | /administration/menu/export.json |
| Import a menu file | /administration/menu/import/ |
Adding a menu item
- Select New menu item.
- Enter the label as users should read it.
- Choose the target screen from the URL name list. The field offers only real screens, so a menu item cannot point at a page that does not exist.
- Choose the permission module and feature. The item then appears only for users who hold view rights on it. Leave this blank only for items everyone may use.
- Choose the parent item, or leave blank for a top-level entry.
- Set the sequence to control its position, or reorder by dragging afterwards.
- Save.
Export the menu before making large changes. The export file is a complete backup and can be re-imported to undo.
4.7 Common tasks
"A new starter needs the same access as an existing colleague"
- Open the colleague at
/users/<id>/and note their roles. - Create the new user (section 4.2).
- Assign the same roles.
- Check
/users/<new-id>/effective-permissions/— if the colleague had direct grants as well, they will not have been copied, and this screen shows the gap.
"Someone has moved department"
- Update the department on their employee record in HR.
- Review any role assignment scoped to their old department at
/users/<id>/, and change or remove the scope.
"Someone has left"
- Deactivate the user at
/users/<id>/deactivate/. - Reassign any open tickets, tasks or approvals assigned to them.
- Do not delete the account.
"A screen must be locked down immediately"
Remove view on the feature from every role that grants it. Because view is the gate, this closes the screen for everyone at once, including direct URL access.
4.8 Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| A menu item is missing for one user | No view right on that feature | Add it to their role |
| A menu item is missing for everyone | The app is not enabled for the workspace, or the menu item has no target | Check Chapter 26; check the item at /administration/menu/ |
| The user sees the screen but buttons are missing | View granted, create/edit not | Add the missing right |
| "Permission denied" after clicking a link | The link was reachable but the target is not permitted | Grant the right, or remove the link from the menu |
| A user still has access after a role change | Sign them out and in again | Permissions are read on sign-in for some caches |
| Nobody can approve a document | No role grants approve on that feature | Create or amend an approver role |
| A user sees other people's data | Scope is not set, or own data only is unticked | Set the scope on the role assignment or the direct permission |
4.9 Reference
Every module code and feature code in the product, with the screens each one unlocks, is listed in Appendix A — Permission reference.