Resources — /rbac/resources and friends
A resource in RBAC is a concrete thing that can be owned, scoped, or referenced by visibility rules — a project, a file, a workspace, and so on. Services register their domain objects with RBAC (registerResource) so that ownership rules can fire at Step 4 of the evaluator and so that visibility / overrides can target individual instances.
This section covers four routes:
/rbac/resources— the list (this page)/rbac/resources/tree— hierarchy visualization/rbac/resources/types— the catalog of resource types and their action definitions/rbac/resources/:resourceId— the per-resource detail page
Resources list — /rbac/resources
What you see
Stat tiles for Total, Active, and Inactive, then a table with one row per resource:
- Name / identifier — display name (
resource.name) and stable identifier - Resource type — e.g.
project,file - Status — active or inactive (deactivated resources stop participating in checks)
- Owner — actor that owns the resource (used for the Step 4 owner-allow rule)
- Updated — last change timestamp
Header buttons jump to the Tree view and to Resource types.
Filters
- Search — substring match against name or identifier
- Resource type —
Allor any registered type - Status —
All,Active, orInactive
Things you can do
| Task | How | Permission |
|---|---|---|
| Browse resources | Scroll the list | canViewResources |
| Open a resource | Tap the row → /rbac/resources/:resourceId | canViewResources |
| Register a new resource | Use the API (registerResource); not exposed in the UI today | resource:register |
| Deactivate a resource | Open the detail, Deactivate | canManageResources |
Resource detail — /rbac/resources/:resourceId
Shows the resource's metadata (name, identifier, resourceType, ownerId / ownerType, parentResourceId, scopeId, metadata, timestamps), its tag chips (read-only, via RbacTagChips + getEntityTags), and a header action to Deactivate the resource.
Deactivating is destructive in effect — permissions referencing this resource stop applying — but reversible at the data layer; today the UI exposes deactivate only (deactivateResource). A confirmation dialog (native on mobile, in-page on web) is required.
Resource tree — /rbac/resources/tree
A nested expand/collapse tree of every registered resource grouped by parent relationship. Each node shows:
- An expand chevron if the resource has children
- The resource's display name and type
- A coloured dot indicating active (
status-success) vs inactive (muted)
Tap a leaf node to drop into its resource detail. The tree is filterable by resource type via the dropdown in the header. Data comes from resourceTree (or resourceTreePage for paginated traversal).
Use the tree when you need to see ownership / containment relationships at a glance — e.g. all files under a project, all rooms under a building.
Resource types — /rbac/resources/types
This page is the action-definition catalog for the workspace. The left column lists every registered resource type (sourced from resourceTypes). Picking one loads its action definitions (actionDefinitions(resourceType:)) on the right:
- Action key (e.g.
read,update,share) - Description (if set)
- Defaults — three flags:
viewerDefault,editorDefault,adminDefault. These determine which level of a role default-grant (Step 6) covers the action. - A
Systemchip when the action is built-in.
This is the canonical place to discover which actions exist for a resource type and what each role level does out of the box. To add or remove a default at the role level, use the Permissions tab in Assignments.
Permissions you need
- All four routes are gated by
canViewResources(PBACrbac:reador auth-levelmodule-rbac:resource:read; admins bypass). - The Deactivate action on a resource requires
canManageResources(rbac:delete/rbac:manage). - Registering a new resource (
registerResource) and managing resource types is API-only today.
Tips
- Resource registration is usually done by the owning service (the the files service registers files, etc.) — manual creation from this UI is intentionally not surfaced. The list reflects what other services have populated.
- The owner-allow rule (Step 4 of the evaluator) only fires when both a
resourceIdis present in the check and the resource is registered here. If an owner can't act on something they created, check that the resource exists in this list. - Inactive resources still appear in Visibility lookups — visibility is by
resourceIdentifier+resourceType, not by registration state — but RBAC checks against them short-circuit.