Limit frontend routes to lightweight admin scope
This commit is contained in:
@@ -21,32 +21,21 @@ const lightMenuNames = new Set([
|
||||
'AIWorkflowRuns',
|
||||
'AnnouncementList',
|
||||
'AnnouncementManage',
|
||||
'Application',
|
||||
'Codex',
|
||||
'ControlCenter',
|
||||
'FileManager',
|
||||
'KnowledgeBase',
|
||||
'LoginLog',
|
||||
'Message',
|
||||
'MessageList',
|
||||
'OrgNode',
|
||||
'StartChat',
|
||||
'SubAppAIAgentEditor',
|
||||
'SubAppAIKnowledgeDetail',
|
||||
'SubAppAIWorkflowEditor',
|
||||
'SubAppAIWorkflowRuns',
|
||||
'SystemConfigManager',
|
||||
'SystemDept',
|
||||
'SystemDict',
|
||||
'SystemManagement',
|
||||
'SystemMenu',
|
||||
'SystemPermission',
|
||||
'SystemPost',
|
||||
'SystemRole',
|
||||
'UIConfigManager',
|
||||
'UserManagement',
|
||||
'userCenter',
|
||||
'userSettings',
|
||||
]);
|
||||
|
||||
function normalizeViewPath(path: string) {
|
||||
@@ -88,8 +77,8 @@ function normalizeBackendRoute<T extends { component?: string; name?: string; pa
|
||||
if (route.name !== 'ControlCenter') return route;
|
||||
|
||||
const normalized = { ...route };
|
||||
normalized.path = '/page-render/main_home';
|
||||
normalized.component = 'online-dev/page-render/index';
|
||||
normalized.path = '/control-center';
|
||||
normalized.component = '_core/control-center/index';
|
||||
normalized.query = undefined;
|
||||
return normalized;
|
||||
}
|
||||
@@ -146,26 +135,16 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
|
||||
'../views/_core/ai-confirmation-center/index.vue',
|
||||
'../views/_core/announcement/index.vue',
|
||||
'../views/_core/announcement/list.vue',
|
||||
'../views/_core/account-settings/index.vue',
|
||||
'../views/_core/application/index.vue',
|
||||
'../views/_core/authentication/login.vue',
|
||||
'../views/_core/authentication/oauth-callback.vue',
|
||||
'../views/_core/chat/index.vue',
|
||||
'../views/_core/control-center/index.vue',
|
||||
'../views/_core/dept/index.vue',
|
||||
'../views/_core/dict/index.vue',
|
||||
'../views/_core/fallback/**/*.vue',
|
||||
'../views/_core/file-manager/index.vue',
|
||||
'../views/_core/file-preview/index.vue',
|
||||
'../views/_core/login-log/index.vue',
|
||||
'../views/_core/menu/index.vue',
|
||||
'../views/_core/message/index.vue',
|
||||
'../views/_core/org-chart/index.vue',
|
||||
'../views/_core/permission/index.vue',
|
||||
'../views/_core/post/index.vue',
|
||||
'../views/_core/role/index.vue',
|
||||
'../views/_core/system-config/index.vue',
|
||||
'../views/_core/ui-config/index.vue',
|
||||
'../views/_core/user/index.vue',
|
||||
'../views/ai-platform/agent/editor/index.vue',
|
||||
'../views/ai-platform/agent/index.vue',
|
||||
@@ -175,7 +154,6 @@ async function generateAccess(options: GenerateMenuAndRoutesOptions) {
|
||||
'../views/ai-platform/workflow/editor/index.vue',
|
||||
'../views/ai-platform/workflow/index.vue',
|
||||
'../views/ai-platform/workflow-runs/index.vue',
|
||||
'../views/online-dev/page-render/index.vue',
|
||||
]);
|
||||
|
||||
const layoutMap: ComponentRecordType = {
|
||||
|
||||
Reference in New Issue
Block a user