Fine-grained access control
Most communities are well served by the built-in groups. When you need something more precise, your forum includes Gatekeeper: a rule-based access-control system you manage entirely from the admin interface — no code, no redeploys.
The three concepts
Section titled “The three concepts”- Permission — an atomic action, like
editpostordeletetopic. Permissions come in three kinds: built-in (shipped with the forum), plugin (added by a plugin), and user-defined (ones you create). - Rule — a logical combination of conditions, using AND, OR, and
grouping. The condition types are
hasany,hasall, andresource_requirement(a resource-scoped check). Example: is an Administrator OR (is a Moderator AND hasdeletepost). - Edict — the link between a rule and a protected resource (an action
or screen in the forum, identified by a resource key such as
view_admin_dashboard). When someone tries to use that resource, Gatekeeper evaluates the edict’s rule to decide whether to allow it.
In short: permissions are the vocabulary, rules are the sentences, and edicts apply a sentence to a place in the app.
Create a permission
Section titled “Create a permission”- Management area → Permissions → Add.
- Enter a descriptive, unique key (e.g.
custom_action). - Save. It’s now available when you build rules.
Build a rule
Section titled “Build a rule”- Management area → Rules → Add.
- Give the rule a clear name (e.g.
admin_or_mod_with_delete). - Use the visual rule builder:
- Toggle the group operator between AND and OR.
- Add conditions — choose a type (
hasany,hasall, orresource_requirement) and pick the permission or role it checks. - Use Add group to nest conditions for complex logic.
- Submit the rule.
Example: admin, or a moderator who can delete
Section titled “Example: admin, or a moderator who can delete”- Set the top-level operator to OR.
- Add a condition:
hasany→ Administrator role. - Add group, set it to AND.
- In the group add
hasany→ Moderator role, andhasany→deletepostpermission. - Submit. Access is granted to administrators, or to moderators who also have
deletepost.
Protect a resource with an edict
Section titled “Protect a resource with an edict”- Management area → Edicts → Add.
- Enter the resource key for the thing you want to protect. It must match the identifier used in the application (the available resource keys are listed in the edicts interface).
- Save, then open Edicts, edit your new edict, and attach the rule you built.
From now on, access to that resource is governed by your rule.
Troubleshooting
Section titled “Troubleshooting”- Rule isn’t taking effect — check that the permissions and roles it names actually exist and are assigned to the members you expect.
- Edict seems ignored — confirm the resource key exactly matches the one used by the application.