Skip to content

Commit 306e376

Browse files
committed
feat: Home page display
1 parent 02e1e14 commit 306e376

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

ui/src/router/routes.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import type { RouteRecordRaw } from 'vue-router'
2+
import { PermissionConst, RoleConst } from '@/utils/permission/data'
23

34
const modules: any = import.meta.glob('./modules/*.ts', { eager: true })
45

@@ -22,6 +23,12 @@ export const routes: Array<RouteRecordRaw> = [
2223
icon: 'app-home',
2324
iconActive: 'app-home-active',
2425
group: 'workspace',
26+
permission: [
27+
RoleConst.USER.getWorkspaceRole,
28+
RoleConst.WORKSPACE_MANAGE.getWorkspaceRole,
29+
PermissionConst.HOMEPAGE_READ.getWorkspacePermissionWorkspaceManageRole,
30+
PermissionConst.HOMEPAGE_READ.getWorkspacePermission,
31+
],
2532
},
2633
children: [
2734
{

ui/src/utils/permission/data.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import { Permission, Role, Edition } from '@/utils/permission/type'
2424
// ANNOTATION = "READ+ANNOTATION" # 标注
2525
// CLEAR_POLICY = "READ+CLEAR_POLICY"
2626
const PermissionConst = {
27+
HOMEPAGE_READ: new Permission('HOMEPAGE:READ'),
2728
APPLICATION: new Permission('APPLICATION'),
2829
KNOWLEDGE: new Permission('KNOWLEDGE'),
2930
TOOL: new Permission('TOOL'),

0 commit comments

Comments
 (0)