zite.permissions.json at the workspace root, then check them in each
workflow that needs them. Schema → permissions file;
concepts → Roles & permissions.
A practical setup
Managers can update any deal. Account executives can update only deals they own:Gotchas
- Match on the role’s
id, never itsname. Names can be renamed; ids are stable, so assignments survive a rename. - Set
authenticated: true. Without it,context.useris 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 infiltersis 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.