Permissions, entitlements and flags
Every check that guards data asks one question: may this user perform this permission in this namespace? Roles answer it, a token's scope can only narrow the answer, and a ban stops the account outright. Entitlements and feature flags sit beside this model and answer different questions; a flag never grants access.
Permission strings
A permission is a string of the form verb:resource, for example read:content, manage:security or api:write. Permissions are always held and checked in a namespace: each app has its own, and platform-wide grants live in namespaces such as system and access-control.
Wildcards match as follows:
| Held | Satisfies |
|---|---|
read:content | exactly read:content |
read:* | any read: permission |
*:content | any verb on content |
*:* | every permission in that namespace |
Roles and bundles
Roles are assigned per user per namespace, and resolve to a stored bundle of permissions for that user in that namespace. A check reads that one bundle. Some checks also accept the same permission held in an administrative namespace, so a platform administrator does not need a grant in every app.
Two grants in the system namespace control use of the API at all: api:read for reads and api:write for writes (which also allows reads). A token caller without them is refused before any REST route or MCP tool runs, however much they hold elsewhere.
How a token narrows them
A personal access token, including one issued through the device flow or OAuth, may carry a scope:
| Scope field | Effect |
|---|---|
readOnly | Every write is refused, whatever the owner's api:write grant. |
namespaces | Only these namespaces can be touched. |
permissions | Only these permissions (wildcards allowed) can be exercised. |
expiresAt | The token stops resolving at this time. |
Each check runs twice: once against the scope, once against the owner's current bundle. Both must pass. A scope of *:* therefore adds nothing beyond what the owner holds, and a scope of read:content denies even a *:* owner everything else. Because the owner's bundle is read on every request, revoking a role takes effect for that person's tokens too. A scope the server cannot parse rejects the token instead of falling back to full authority. A token without a scope carries its owner's full permissions.
When minting a token, a scope that asks for permissions the owner does not hold in any of the listed namespaces is refused with an explanation; that is a convenience, and the per-request check above is what enforces the boundary.
Bans
An account has one of four standing states, from least to most severe: clean, warned, suspended, banned.
| Action | What the user experiences |
|---|---|
| Warning | A notification with the reason. Access is unchanged. |
| Suspension | Every session ends at once, sign-in is refused, and the account's tokens stop resolving until the suspension expires or is lifted. The user is emailed. |
| Ban | The same as a suspension, with no end date. |
A suspended, banned or inactive account is treated as signed out: its sessions and tokens no longer resolve, and work queued on its behalf is refused when it runs. Issuing or revoking a ban needs manage:security in access-control; viewing bans needs read:security. Every issue and revocation is written to the security audit log. When the last active suspension or ban is lifted, the user is told by email.
Entitlements and feature flags
Gating holds three kinds of thing, each answering a different question:
| Question | Example | Who changes it | |
|---|---|---|---|
| Permission | May this person do this? | manage:security in access-control | An administrator making a trust decision |
| Entitlement | Does this person's plan include this, and how much? | Monthly AI credit allowance; whether AI narration is in the plan | Plan and billing policy |
| Feature flag | Is this feature switched on for this person right now? | A gradual rollout of a new view in one app | An engineer rolling a feature out or back |
How they relate:
- A flag never grants access. A flag can switch a feature off or limit its rollout to a group or a percentage of people, but it never lets anyone do something their permissions do not allow. Permission checks never consult flags.
- An entitlement never grants a permission. Where both apply, the server checks the permission and the entitlement separately and refuses with a distinct reason: not authorised, or not in your plan.
- The server decides. Every flag and entitlement key is declared in code with its default, so a missing setting resolves to that default rather than to an accident. A client may read its own verdict for the keys published to its app, but only as a hint for what to show; the server's check is the one that counts.
- A client sees only its own answer. The client read returns the caller's own value for each published key and nothing else: no rules, groups, percentages or other keys. A signed-out, revoked, banned or suspended caller gets the anonymous answer.
Flags have an on/off switch, an optional parent flag (a parent that is off for someone turns every child off for them), an optional required entitlement, rollout steps by group and percentage, and an optional start and end time. Raising a rollout percentage only adds people; nobody who had the feature loses it.
Managing flags, entitlements and groups is itself a set of permissioned capabilities on REST and MCP; see the API reference. For the order these checks run in on a request, see From request to data.