Skip to main content

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 roleDescription
adminPlatform governance and global administration role.
memberNormal platform member role.
Resource roleDescription
readerRead-only access, downloads, and exports.
managerEvery resource operation except permanent deletion.
ownerManager plus permanent deletion.
Access sourceDescription
ownedThe user is the resource's unique Owner.
direct_shareA direct user share.
group_shareA group share.
publicThe implicit Reader grant from a platform-internal Public KB.
platform_adminThe global Manager-level Platform Admin grant.
OperationIdMinimum resource rolePlatform Admin onlyDescription
marketplace.catalog.read—falseEvery active Member can browse Marketplace.
marketplace.install.execute—falseEvery active Member can install content.
marketplace.user_copy.manage—falseA Member can manage only their own user-scope copy.
marketplace.content.publish—trueOnly Platform Admin can publish canonical content.
marketplace.content.manage—trueOnly Platform Admin can manage canonical content.
marketplace.delete.execute—trueOnly Platform Admin can delete canonical content.
marketplace.registry.manage—trueOnly Platform Admin can manage the Registry.
workspace.collection.read—falseA Member can list accessible Workspaces.
workspace.create—falseA Member can create a Workspace and become Owner.
knowledge_base.collection.read—falseA Member can list owned, shared, and Public KBs.
knowledge_base.create—falseA Member can create a Knowledge Base and become Owner.
user_management.manage—trueOnly Platform Admin can manage users and groups.
platform_resources.read—trueOnly Platform Admin can read the global resource list.
platform_resources.owner.reassign—trueOnly Platform Admin can perform an audited Owner reassignment.
platform_resources.knowledge_base.quota.update—trueOnly Platform Admin can update a Knowledge Base quota.
platform_resources.workspace.capacity.expand—trueOnly Platform Admin can request Workspace capacity expansion.
Error codeDescription
PLATFORM_AUTHORIZATION_DENIEDThe platform operation is not allowed.
MANAGER_SESSION_REQUIREDThe Manager Session is missing, expired, or does not match the current OIDC principal.
MANAGER_SESSION_ORIGIN_INVALIDThe mutation request Origin is not an allowed platform origin.
MANAGER_SESSION_CSRF_INVALIDThe mutation request does not carry valid Manager Session CSRF evidence.
RESOURCE_DELETE_CONFIRMATION_MISMATCHThe deletion confirmation does not match the resource name.
  • contracts/authorization/wire-contract.json
  • contracts/authorization/operation-requirements.json
  • workspace-manager/app/modules/authorization/operation_policy.py::AuthorizationOperationPolicy
  • frontend/src/shared/authorization/resourceAuthorization.ts::normalizeResourceAuthorization