Give and remove access automatically
Section titled “Give and remove access automatically”This how-to is for builders who want access to follow the data: when an employee starts, they get into the modules they need; when a project member is added, they can open the project’s dashboard; when someone leaves, their access goes and their account is switched off — without an administrator doing it by hand each time.
The example is an Employees entity with a User field (the person’s account) and a Status choice field.
You need:
- Developer access on the module, to add reactions.
- Your own access to every resource your reactions grant: you can only grant what you hold yourself (see Who may save it).
- The basics of reactions. See Reactions & automation.
What the actions can do
Section titled “What the actions can do”| Action | What it does |
|---|---|
Set Permission Since 1.10 | Gives a user or a group access, at a level, to the whole system, a module, an entity, a view, a page or a report. |
Remove Permission Since 1.10 | Takes away a user’s or a group’s own access to one of those. |
| Activate/Deactivate User | Switches user accounts on or off. |
These actions grant access to resources, not to single records. To decide which records each person sees, use visibility rules instead. See Show each team only its own records.
Step 1: Give access when an employee starts
Section titled “Step 1: Give access when an employee starts”- On Employees, add a reaction Onboard with the event On Entry Updated. In Choose fields, choose Status, so it runs only when the status changes, and add the filter Status = Active. See Run it only for some records.
- Add Activate/Deactivate User:
- Activate/Deactivate: Activate.
- Source: User Field, then the User field.
- Add Set Permission:
- Resource Type: Module, then the Timesheets module.
- Level: Edit.
- User or Group: User.
- Principal Source: Field, then the User field in Reference Field.
- Add another Set Permission for Resource Type Page, the HR portal page, Level View.
- Save.
Where the person or group comes from
Section titled “Where the person or group comes from”| Principal Source | Use it for |
|---|---|
| Fixed | Always the same user or group, chosen in Fixed Value. |
| Field | A person or group field of the record, chosen in Reference Field. Only person fields are listed for User, only group fields for Group. A field with several people grants each of them. |
| Expression | A user or group worked out from the record. |
| Pointer | For User: @me, @current_user and @myGroupsUsers. For Group: @myGroups, @myRoles, @myQueryGroups and other group pointers. |
The levels you can grant
Section titled “The levels you can grant”| Resource Type | Levels offered |
|---|---|
| System | Admin, Edit, Developer, View |
| Module, Entity | Edit, Developer, View |
| View, Page, Report | View |
Step 2: Remove access when the employee leaves
Section titled “Step 2: Remove access when the employee leaves”- Add a reaction Offboard with the event On Entry Archived — or On Entry Updated with the filter Status = Left.
- Add Remove Permission with Resource Type Module, the Timesheets module, and the User field, as in Step 1. Add one for each resource you granted.
- Add Activate/Deactivate User, with Deactivate and the User field.
- Save.
A deactivated user is signed out and cannot sign in, but keeps their groups and grants until you remove them. See Deactivate or reactivate an account and Offboard someone who leaves.
How the actions behave
Section titled “How the actions behave”- Set Permission never lowers access. If the person already has a higher level on that resource, they keep it.
- A first grant brings minimal system access with it. A person with no access to the system at all is first given the smallest system access, so the module or entity grant can take effect.
- Remove Permission removes the whole grant that the user or group has on that resource, whatever its level. Access the person gets through a group is not touched — remove the group’s grant, or take them out of the group.
- Groups stay groups. Granting a group gives the group access; its members get it through the group, including members added later.
- An empty field fails the action. If the User field is empty, that action fails, and the reaction’s other actions still run.
- Activate/Deactivate User skips accounts that are already in the state you chose.
Who may save it
Section titled “Who may save it”Each Set Permission and Remove Permission action is checked when you save the reaction, against your own access:
- To grant a level, you must hold that level on the resource yourself.
- To remove access, you need Admin on the resource.
Otherwise saving fails with You can’t save a reaction that grants or removes more access than you have on that resource. Ask an administrator to add or save that action. Actions you did not change are not checked again.
Check the result
Section titled “Check the result”- Set a test employee to Active.
- Sign in as that person, or check their access in Permissions: the module and the page are there.
- Archive the test employee. Their access to the module is gone, and they can no longer sign in.
- If something did not happen, open the reaction’s run history: a failed action shows why — for example an empty User field. See Check that it ran.
Troubleshooting
Section titled “Troubleshooting”| Problem | What to check |
|---|---|
| The reaction cannot be saved | You do not hold the level you grant, or you lack Admin on a resource you remove. |
| The person’s level did not change | They already had a higher level. Set Permission never lowers access. |
| The person still has access after Remove Permission | They have it through a group. |
| The User field is not offered in Reference Field | User or Group is set to Group, or the field does not hold people. |
| A View, Page or Report cannot be given Edit | These resources only take View. |
| One action failed, the others ran | Actions fail on their own. An empty person field is the usual cause. |
See also
Section titled “See also”Platform 1.10.0 · Backend 1.11.0-alpha.11 · Frontend 1.11.0-alpha.6 · Mobile 1.10.2 · Chart 1.11.8 · Gateway 2.6.11 · MCP 0.2.0 · Grafana DS 1.2.0Docs build 2026-11-27