Protected ReadonlydbStaticinstanceThe process service: the shared database and the internal event bus.
Gives a user this role, replacing any other. Idempotent.
permissionKeys is the full set; an unknown key fails the whole create.
Hard-deletes a custom role; the table has no deleted_at. System roles
and roles still held by a user are refused.
The permission keys the user's role grants, deduped and sorted; [] for
no role. One query, for the per-request auth path (lib/auth.ts).
Optionalinput: {Optionalids?: string[]Optionalnames?: string[]Optionalpage?: numberOptionalpageSize?: numberOptionaluserIds?: string[]Roles held by any of these users.
Clears a user's role. Idempotent.
Updates the name and description, and replaces the permission set when
permissionKeys is given. A field whose value is unchanged is not written.
Role catalog, role↔permission mapping and per-user role assignment. One role per user, so assigning replaces whatever the user held. A role assignment publishes with
publishConfirmed; catalog edits are config, sopublish.