Skip to main content

Sharing and Permissions

Purpose and Entry Point​

Enter Sharing and Settings from knowledge-base detail to manage direct sharing, group sharing, and public visibility.

Roles and Allowed Operations​

Detail requires reader; sharing and visibility changes require manager; permanent deletion requires owner.

Core Concepts​

Multiple access sources produce the highest effective role while retaining all sources. Public provides reader only.

Primary Workflow​

Add or remove user/group shares, change visibility, and reload the resource authorization response.

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​

After revocation, Frontend stops mutations according to new allowedOperations and never retains a stale role.

Source Basis​

OperationIdMinimum resource rolePlatform Admin onlyDescription
knowledge_base.detail.readreaderfalseReader or higher can read the Knowledge Base.
knowledge_base.content.writemanagerfalseManager or higher can mutate canonical content.
knowledge_base.settings.managemanagerfalseManager or higher can manage settings.
knowledge_base.share.managemanagerfalseManager or higher can manage direct and group shares.
knowledge_base.visibility.managemanagerfalseManager or higher can switch Private or Public visibility.
knowledge_base.deleteownerfalseOnly the actual Owner can permanently delete a Knowledge Base.
Error codeDescription
KB_ACCESS_DENIEDNo Private KB relationship; the response hides resource existence.
KB_PERMISSION_DENIEDCurrent KB operations are insufficient.
KB_DELETE_ATTACHMENT_CONFLICTA Workspace attachment still blocks permanent deletion.
KB_DELETE_STORAGE_CLEANUP_FAILEDThe database deletion completed, but storage cleanup failed; the platform reports failure for follow-up.
  • frontend/src/features/knowledge-base/model/knowledgeBasePermissions.ts::resolveKnowledgeBasePermissions
  • workspace-manager/app/modules/knowledge_base/
  • workspace-manager/app/modules/authorization/resource_access.py