Skip to main content

Capabilities & Permissions

Permissions are attached to Features and assigned to subjects (usually roles).

Feature & Permission Model

ConceptDescription
FeatureCanonical capability key (e.g., USER_MGMT, FEATURE_FLAG)
Permission fieldsread, create, update, delete, restore and optional extraActions (e.g., ASSIGN, UNASSIGN, UPDATE_ASSIGNMENT)
UniquenessOne Permission per Feature (validated by data layer; service maps conflicts to 409 or 400)

Assignment

ConceptDescription
Subject typesTypically ROLE (other subject types may be supported by the data layer)
UniquenessComposite unique (permissionId, subjectType, subjectId) prevents duplicates
AuditingService methods expose create/update/delete operations for assignments and audit every change

Guarding

  • Controllers check capability using role membership and assigned permissions
  • Batch checks supported via /capabilities/can in the backend for UI usage