Permissions and Roles
Purpose and Entry Point
This is the canonical feature description for platform, Workspace, and knowledge-base authorization behavior.
Roles and Allowed Operations
Platform roles are admin/member; resource roles are owner/manager/reader. Platform scope uses the platform role, while resource scope uses the effective resource role and Operation Requirement.
Core Concepts
allowedOperations is the frontend contract. accessSource(s) identifies owned, direct_share, group_share, public, or platform_admin origins.
Primary Workflow
Manager validates the local user snapshot, then checks the operation. Resource admin override only elevates to manager, is audited, and cannot perform owner-only deletion.
View States and Read-only Behavior
The view handles loading, empty, error, and denied states separately. With read-only operations, readable content and normal mutation controls remain visible while mutations are disabled with an i18n reason. Without read access, protected queries, providers, and realtime connections do not start.
Constraints, Failures, and Safety
Missing authorization fields, unknown roles, or contradictory sources fail closed. Missing access and insufficient role retain 404 and 403 semantics.
A missing, expired, revoked, or principal-mismatched Manager Session returns
401 MANAGER_SESSION_REQUIRED, and Frontend enters OIDC reauthentication once. Valid Session
evidence with a denied local user policy or platform operation returns
403 PLATFORM_AUTHORIZATION_DENIED, preserves the Session, and does not reauthenticate.
Source Basis
| Platform role | Description |
|---|---|
admin | Platform governance and global administration role. |
member | Normal platform member role. |
| Resource role | Description |
|---|---|
reader | Read-only access, downloads, and exports. |
manager | Every resource operation except permanent deletion. |
owner | Manager plus permanent deletion. |
| Access source | Description |
|---|---|
owned | The user is the resource's unique Owner. |
direct_share | A direct user share. |
group_share | A group share. |
public | The implicit Reader grant from a platform-internal Public KB. |
platform_admin | The global Manager-level Platform Admin grant. |
| OperationId | Minimum resource role | Platform Admin only | Description |
|---|---|---|---|
marketplace.catalog.read | — | false | Every active Member can browse Marketplace. |
marketplace.install.execute | — | false | Every active Member can install content. |
marketplace.user_copy.manage | — | false | A Member can manage only their own user-scope copy. |
marketplace.content.publish | — | true | Only Platform Admin can publish canonical content. |
marketplace.content.manage | — | true | Only Platform Admin can manage canonical content. |
marketplace.delete.execute | — | true | Only Platform Admin can delete canonical content. |
marketplace.registry.manage | — | true | Only Platform Admin can manage the Registry. |
workspace.collection.read | — | false | A Member can list accessible Workspaces. |
workspace.create | — | false | A Member can create a Workspace and become Owner. |
knowledge_base.collection.read | — | false | A Member can list owned, shared, and Public KBs. |
knowledge_base.create | — | false | A Member can create a Knowledge Base and become Owner. |
user_management.manage | — | true | Only Platform Admin can manage users and groups. |
platform_resources.read | — | true | Only Platform Admin can read the global resource list. |
platform_resources.owner.reassign | — | true | Only Platform Admin can perform an audited Owner reassignment. |
platform_resources.knowledge_base.quota.update | — | true | Only Platform Admin can update a Knowledge Base quota. |
platform_resources.workspace.capacity.expand | — | true | Only Platform Admin can request Workspace capacity expansion. |
| Error code | Description |
|---|---|
PLATFORM_AUTHORIZATION_DENIED | The platform operation is not allowed. |
MANAGER_SESSION_REQUIRED | The Manager Session is missing, expired, or does not match the current OIDC principal. |
MANAGER_SESSION_ORIGIN_INVALID | The mutation request Origin is not an allowed platform origin. |
MANAGER_SESSION_CSRF_INVALID | The mutation request does not carry valid Manager Session CSRF evidence. |
RESOURCE_DELETE_CONFIRMATION_MISMATCH | The deletion confirmation does not match the resource name. |
contracts/authorization/wire-contract.jsoncontracts/authorization/operation-requirements.jsonworkspace-manager/app/modules/authorization/operation_policy.py::AuthorizationOperationPolicyfrontend/src/shared/authorization/resourceAuthorization.ts::normalizeResourceAuthorization