From f846836d5d6a2ce80db59b143551a4f629c7fab4 Mon Sep 17 00:00:00 2001 From: ningyv <1793599591@qq.com> Date: Mon, 14 Apr 2025 14:09:09 +0800 Subject: [PATCH] feature/1.7-MCP --- frontend/packages/common/src/const/permissions.ts | 15 +++++++++++++++ .../common/src/contexts/GlobalStateContext.tsx | 4 ++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/frontend/packages/common/src/const/permissions.ts b/frontend/packages/common/src/const/permissions.ts index 132f9641..8aad4cf5 100644 --- a/frontend/packages/common/src/const/permissions.ts +++ b/frontend/packages/common/src/const/permissions.ts @@ -254,6 +254,21 @@ export const PERMISSION_DEFINITION = [ anyOf: [{ backend: ['system.settings.ai_balance.manager'] }] } }, + 'system.settings.mcp.manager': { + granted: { + anyOf: [{ backend: ['system.settings.mcp.manager'] }] + } + }, + 'system.settings.mcp.view': { + granted: { + anyOf: [{ backend: ['system.settings.mcp.view'] }] + } + }, + 'system.settings.apikey.view': { + granted: { + anyOf: [{ backend: ['system.settings.apikey.view'] }] + } + }, 'system.devops.policy.view': { granted: { anyOf: [{ backend: ['system.settings.strategy.view'] }] diff --git a/frontend/packages/common/src/contexts/GlobalStateContext.tsx b/frontend/packages/common/src/contexts/GlobalStateContext.tsx index 99087cd1..6e60c5db 100644 --- a/frontend/packages/common/src/contexts/GlobalStateContext.tsx +++ b/frontend/packages/common/src/contexts/GlobalStateContext.tsx @@ -201,14 +201,14 @@ const mockData = [ key: 'mcpService', path: '/mcpService', icon: 'ph:network-x', - access: '' + access: 'system.settings.mcp.view' }, { name: 'API Key', key: 'mcpKey', path: '/mcpKey', icon: 'material-symbols:key', - access: '' + access: 'system.settings.apikey.view' }, { name: '数据源',