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
| OperationId | Minimum resource role | Platform Admin only | Description |
|---|---|---|---|
knowledge_base.detail.read | reader | false | Reader or higher can read the Knowledge Base. |
knowledge_base.content.write | manager | false | Manager or higher can mutate canonical content. |
knowledge_base.settings.manage | manager | false | Manager or higher can manage settings. |
knowledge_base.share.manage | manager | false | Manager or higher can manage direct and group shares. |
knowledge_base.visibility.manage | manager | false | Manager or higher can switch Private or Public visibility. |
knowledge_base.delete | owner | false | Only the actual Owner can permanently delete a Knowledge Base. |
| Error code | Description |
|---|---|
KB_ACCESS_DENIED | No Private KB relationship; the response hides resource existence. |
KB_PERMISSION_DENIED | Current KB operations are insufficient. |
KB_DELETE_ATTACHMENT_CONFLICT | A Workspace attachment still blocks permanent deletion. |
KB_DELETE_STORAGE_CLEANUP_FAILED | The database deletion completed, but storage cleanup failed; the platform reports failure for follow-up. |
frontend/src/features/knowledge-base/model/knowledgeBasePermissions.ts::resolveKnowledgeBasePermissionsworkspace-manager/app/modules/knowledge_base/workspace-manager/app/modules/authorization/resource_access.py