Skip to content

Commit f303fc4

Browse files
authored
feat: workspace manage role (#3335)
1 parent 2336f38 commit f303fc4

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

ui/src/utils/permission/type.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,14 @@ export class Permission {
4242
const { user } = useStore()
4343
return `${this.permission}:/WORKSPACE/${user.getWorkspaceId()}`
4444
}
45+
/**
46+
* 自定义工作空间管理员权限
47+
* @returns
48+
*/
49+
getWorkspacePermissionWorkspaceManageRole = () => {
50+
const { user } = useStore()
51+
return `${this.permission}:/WORKSPACE/${user.getWorkspaceId()}:ROLE/$WORKSPACE_MANAGE`
52+
}
4553
/**
4654
* 工作空间资源权限
4755
* @param workspace_id 工作空间id
@@ -58,16 +66,16 @@ export class Permission {
5866
* @param resource_id 资源id
5967
* @returns 工作空间下知识库资源权限
6068
*/
61-
getKnowledgeWorkspaceResourcePermission=( resource_id: string)=>{
62-
return this.getWorkspaceResourcePermission('KNOWLEDGE',resource_id)
69+
getKnowledgeWorkspaceResourcePermission = (resource_id: string) => {
70+
return this.getWorkspaceResourcePermission('KNOWLEDGE', resource_id)
6371
}
6472
/**
6573
*
6674
* @param resource_id 资源id
6775
* @returns 工作空间下应用资源权限
6876
*/
69-
getApplicationWorkspaceResourcePermission=( resource_id: string)=>{
70-
return this.getWorkspaceResourcePermission('APPLICATION',resource_id)
77+
getApplicationWorkspaceResourcePermission = (resource_id: string) => {
78+
return this.getWorkspaceResourcePermission('APPLICATION', resource_id)
7179
}
7280
toString() {
7381
return this.permission

0 commit comments

Comments
 (0)