Skip to main content
Declare roles once in zite.permissions.json at the workspace root, then check them in each workflow that needs them. Schema → permissions file; concepts → Roles & permissions.
The platform does not enforce roles. A workflow that doesn’t check a role is open to everyone who can call it.

A practical setup

Managers can update any deal. Account executives can update only deals they own:

Gotchas

  • Match on the role’s id, never its name. Names can be renamed; ids are stable, so assignments survive a rename.
  • Set authenticated: true. Without it, context.user is null for anonymous visitors, who hold no roles at all.
  • Check every workflow that touches the data. Reads count too: scope a list to the caller with a filter, such as zite.deals.findAll({ filters: { ownerEmail: context.user.email } }).
  • Check filter keys against .zite/db.ts. An unrecognized key in filters is dropped rather than raising, so a typo makes the query broader than you wrote. See the database client.
  • useAuth() does not carry roles. If the frontend needs them to hide actions, return them from a workflow. Hiding a button is a courtesy; the workflow check is the control.
  • You define roles; a human assigns them on the Members page.