Roles
- Defined in
zite.permissions.jsonat the workspace root: each role has anid, aname, and an optionaldescription. The description is what app code is written against. - Assigned manually to workspace members (not condition-based) on the Members page.
- Two built-in roles are applied automatically and never appear in the file:
All users(builtin:all-users), held by everyone who is signed in, internal or external, andTeam members(builtin:all-team-members), held by members of your Zite organization. A signed-out visitor holds no roles.
Checking roles
Roles are oncontext.user.roles as { id, name }[]. Check them in the workflow with hasRole, matching on
the role’s id (names can be renamed freely):
authenticated: true rather than a check for builtin:all-users. Scheduled and
webhook runs have no context.user, so every role check is false there. useAuth() on the frontend does not
carry roles; to gate UI, return them from a workflow.
App access is separate from roles: internal apps are limited to the org members given access to them, and
external apps control signups through their authentication settings.