Permissions & RBAC
Weavestream uses three orthogonal RBAC axes: a global role, a per-user default tenant access (globalAccess), and per-tenant memberships. Platform-admin actions are gated by capabilities. All authorization is evaluated from a single resolver.
RBAC Model
User account
├── Global role (SUPER_ADMIN / OPERATOR / CONTRACTOR / CLIENT_USER)
├── Default tenant access (OPERATOR only: FULL / READONLY / NONE)
├── Platform capabilities (OPERATOR only)
└── Per-tenant memberships (FULL / READONLY)
Global Roles
Membership Roles (memberships.role)
An explicit membership overrides default tenant access for that tenant.
Default Tenant Access (users.globalAccess)
Only applies to OPERATOR users when they do not have an explicit membership for a tenant.
Platform Capabilities (users.platformCapabilities)
Capabilities gate platform-admin tasks. SUPER_ADMIN has all capabilities implicitly.
The manager preset grants common operational capabilities (COMPANY_MANAGE, INTEGRATION_MANAGE, LAYOUT_MANAGE, TAG_MANAGE, USER_MANAGE, MEMBERSHIP_MANAGE, AUDIT_READ, SECURITY_READ, IP_RULE_MANAGE). Sensitive capabilities such as SETTINGS_MANAGE, EXPORT_CREATE, ALERT_MANAGE, and BACKUP_MANAGE should be granted deliberately.
Assigning Global Roles
Global roles are set when creating a user account from Admin → Users → New User. They can be changed later by a SUPER_ADMIN from the user's profile page.
Changing a global role
Changing a user from OPERATOR to CLIENT_USER revokes all their operator memberships. The change takes effect on the next API request — active sessions are not immediately invalidated.
Granting Tenant Access
- Navigate to Admin → Memberships or the tenant's Members tab
- Click Add Member
- Search for the user by name or email
- Select
FULLorREADONLY - For Contractors: set an
expiresAtdate
The user gains access immediately.
Removing Tenant Access
- Open the membership from Admin → Memberships or the tenant's Members tab
- Click Remove
Access is revoked on the next API request. There is no grace period.
Contractor Expiry
When a CONTRACTOR membership reaches its expiresAt timestamp, every subsequent API request from that user returns a 403 Forbidden response. The user's account remains active — they can still log in — but all tenant access is blocked.
To extend a contractor's access, update the expiresAt date on their membership.
SUPER_ADMIN Access
SUPER_ADMIN users do not need memberships — they have unrestricted access to all tenants automatically. You cannot grant a SUPER_ADMIN a per-tenant membership (it would be redundant).
Visibility Flags vs RBAC
RBAC controls who can access which tenant. Visibility flags (visibleToClients) control what content within a tenant a client user can see.
Both layers are enforced server-side.
Resolution Order
For tenant-scoped checks, the resolver evaluates in this order:
SUPER_ADMIN=> allow.- If action requires a capability, require it (or
SUPER_ADMIN) or deny. - Active tenant membership (
FULL/READONLY) overrides default access. - Fall back to
users.globalAccessforOPERATORusers.