Role assigned to a user of this actor at join time — the baseline grade.
MUST be one of roles[].name. Use null when the actor declares no
roles, or when every grade is granted only by another grade so there is
no baseline at join. When null, the first holder of a granting grade
must be conferred by a business operation (e.g. creating a resource makes
you its owner) rather than by a IActorRole.grants edge, since a
grant always needs a pre-existing granter.
Whenever roles is non-empty, a grade must be obtainable: either set
defaultRole, or give at least one role a non-empty
IActorRole.grants. Otherwise every user would be permanently
gradeless and no grade-restricted operation could ever be reached. When
the requirements are silent but roles exist, default this to the lowest
role (the one no other role inherits).
Description of this actor's permissions and capabilities.
Permission level:
MUST use camelCase. Referenced in schema models and auth decorators.
Business roles, titles, or positions that share this actor's login and account lifecycle.
Keep kind for coarse authentication class only. Use roles when the
product has an internal hierarchy such as owner > manager > staff, or
when a single authenticated actor can operate under multiple business
positions. Use an empty array when no internal role distinction is
needed. Do not create a single default role only to restate the actor
itself (for example user under member); fold that into the actor
description instead.
Do not put per-instance authority here. Roles such as project owner, community moderator, ticket assignee, record creator, or any permission gained from a relationship to one resource record are domain relationships/entities, not actor grades.
A guest actor is unauthenticated and holds no business grade, so its
roles MUST be empty; model graded behavior on a member or admin
actor instead.
An authenticated user type used for authorization throughout the app.