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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user