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