Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ui/src/permission/modules/application/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ const system = {

// —— 组合:跳转/进入应用 ——
/**
* 系统「应用资源管理」(系统 > 资源管理 > 应用)进入权限
* 系统「应用资源管理」(系统 > 资源管理 > 应用)只读权限
* */
jumpRead: () => canSys(P.RESOURCE_APPLICATION_READ) && hasEdition(Edition.PE),
read: () => canSys(P.RESOURCE_APPLICATION_READ) && hasEdition(Edition.PE),
}

export default system
2 changes: 1 addition & 1 deletion ui/src/permission/modules/application/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const workspace = {
chatLogAddKnowledge: (id: string) => canRes(P.APPLICATION_CHAT_LOG_ADD_KNOWLEDGE, id),

// —— 组合:跳转/进入应用(概览读 或 应用读 皆可)——
jumpRead: (id: string) => canRes(P.APPLICATION_OVERVIEW_READ, id) || canRes(P.APPLICATION_READ, id),
read: (id: string) => canRes(P.APPLICATION_OVERVIEW_READ, id) || canRes(P.APPLICATION_READ, id),
}

export default workspace
4 changes: 2 additions & 2 deletions ui/src/permission/modules/knowledge/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ const share = {

// —— 组合:进入知识库 ——
/**
* 系统「共享知识库」(系统 > 共享 > 知识库)进入权限
* 系统「共享知识库」(系统 > 共享 > 知识库)只读权限
* */
jumpRead: () => canSys(P.SHARED_KNOWLEDGE_WORKFLOW_READ) && hasEdition(Edition.PE),
read: () => canSys(P.SHARED_KNOWLEDGE_WORKFLOW_READ) && hasEdition(Edition.PE),
}

export default share
4 changes: 2 additions & 2 deletions ui/src/permission/modules/knowledge/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ const system = {

// —— 组合:进入知识库 ——
/**
* 系统「知识库资源管理」(系统 > 资源管理 > 知识库)进入权限
* 系统「知识库资源管理」(系统 > 资源管理 > 知识库)只读权限
* */
jumpRead: () => canSys(P.RESOURCE_KNOWLEDGE_DOCUMENT_READ) && hasEdition(Edition.PE),
read: () => canSys(P.RESOURCE_KNOWLEDGE_DOCUMENT_READ) && hasEdition(Edition.PE),
}

export default system
2 changes: 1 addition & 1 deletion ui/src/permission/modules/knowledge/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const workspace = {
hitTest: () => false,

// —— 组合:进入知识库 ——
jumpRead: (id: string) => canRes(P.KNOWLEDGE_DOCUMENT_READ, id) || canRes(P.KNOWLEDGE_WORKFLOW_READ, id),
read: (id: string) => canRes(P.KNOWLEDGE_DOCUMENT_READ, id) || canRes(P.KNOWLEDGE_WORKFLOW_READ, id),
}

export default workspace
1 change: 0 additions & 1 deletion ui/src/permission/modules/model/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Edition } from '@/permission/core/common'
const share = {
// —— 共享页不提供 ——
isShare: () => false,
jumpRead: () => false,
debug: () => false,
auth: () => false,
folderRead: () => false,
Expand Down
1 change: 0 additions & 1 deletion ui/src/permission/modules/model/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { Edition } from '@/permission/core/common'
const system = {
// —— 系统页不提供 ——
create: () => false,
jumpRead: () => false,
debug: () => false,
authToWorkspace: () => false,
folderRead: () => false,
Expand Down
1 change: 0 additions & 1 deletion ui/src/permission/modules/model/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const workspace = {
// —— 工作空间级 ——
isShare: () => can(P.MODEL_READ),
create: () => can(P.MODEL_CREATE),
jumpRead: () => false,
debug: () => false,
authToWorkspace: () => false,

Expand Down
1 change: 0 additions & 1 deletion ui/src/permission/modules/tool/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const share = {
isShare: () => false,
batchDelete: () => false,
batchMove: () => false,
jumpRead: () => false,
auth: () => false,
triggerRead: () => false,
triggerCreate: () => false,
Expand Down
1 change: 0 additions & 1 deletion ui/src/permission/modules/tool/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const system = {
batchMove: () => false,
import: () => false,
copy: () => false,
jumpRead: () => false,
authToWorkspace: () => false,
folderRead: () => false,
folderCreate: () => false,
Expand Down
1 change: 0 additions & 1 deletion ui/src/permission/modules/tool/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const workspace = {
batchDelete: () => can(P.TOOL_BATCH_DELETE),
batchMove: () => can(P.TOOL_BATCH_MOVE),
import: () => can(P.TOOL_IMPORT),
jumpRead: () => false,
debug: () => false,
authToWorkspace: () => false,

Expand Down
10 changes: 5 additions & 5 deletions ui/src/router/admin/system/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const systemRoutes: RouteRecordRaw = {
order: 20,
resourceScope: 'system-resource',
permission: () => {
return perm.application.system.jumpRead() || perm.knowledge.system.jumpRead() || perm.tool.system.read() || perm.model.system.read()
return perm.application.system.read() || perm.knowledge.system.read() || perm.tool.system.read() || perm.model.system.read()
},
next: 'system-share',
},
Expand All @@ -158,13 +158,13 @@ export const systemRoutes: RouteRecordRaw = {
path: 'applications',
name: 'system-resource-applications',
component: () => import('@/views/system/resource-management/application/index.vue'),
meta: { title: '智能体', order: 10, permission: perm.application.system.jumpRead, next: 'system-resource-knowledge' },
meta: { title: '智能体', order: 10, permission: perm.application.system.read, next: 'system-resource-knowledge' },
},
{
path: 'knowledge',
name: 'system-resource-knowledge',
component: () => import('@/views/system/index.vue'),
meta: { title: '知识库', order: 20, permission: perm.knowledge.system.jumpRead, next: 'system-resource-tools' },
meta: { title: '知识库', order: 20, permission: perm.knowledge.system.read, next: 'system-resource-tools' },
},
{
path: 'tools',
Expand Down Expand Up @@ -192,7 +192,7 @@ export const systemRoutes: RouteRecordRaw = {
order: 30,
resourceScope: 'system-shared',
permission: () => {
return perm.knowledge.share.jumpRead() || perm.model.share.read() || perm.tool.share.read()
return perm.knowledge.share.read() || perm.model.share.read() || perm.tool.share.read()
},
next: 'system-chat-management',
},
Expand All @@ -201,7 +201,7 @@ export const systemRoutes: RouteRecordRaw = {
path: 'knowledge',
name: 'system-shared-knowledge',
component: () => import('@/views/system/index.vue'),
meta: { title: '知识库', order: 10, permission: perm.knowledge.share.jumpRead, next: 'system-shared-tools' },
meta: { title: '知识库', order: 10, permission: perm.knowledge.share.read, next: 'system-shared-tools' },
},

{
Expand Down
Loading