refactor(permissions): enhance role-based access controls across knowledge base and agent views

- Updated visibility conditions for various UI elements based on user roles, ensuring that only users with appropriate permissions (Admin, Contributor, or KB creator) can access certain actions.
- Introduced computed properties to manage permissions for sharing knowledge bases, managing data sources, and executing graph extraction.
- Adjusted the AgentList and KnowledgeBase components to reflect these changes, improving user experience by preventing unauthorized actions from being displayed.
- Ensured that the backend routes are aligned with the updated frontend role checks, enhancing security and clarity in user interactions.
This commit is contained in:
wizardchen
2026-05-15 17:56:58 +08:00
committed by lyingbug
parent e7f9a6580a
commit c6a2f6c8cc
9 changed files with 104 additions and 28 deletions
+1 -1
View File
@@ -352,7 +352,7 @@
<span v-if="shared.is_mine" class="shared-by-me-badge">{{ $t('listSpaceSidebar.mine') }}</span>
</div>
<t-popup
v-if="!shared.is_mine"
v-if="!shared.is_mine && authStore.hasRole('admin')"
:visible="openMoreAgentId === 'shared-tab-' + shared.share_id"
trigger="hover"
overlayClassName="card-more-popup"