@@ -51,6 +51,16 @@ const DocumentRouter = {
5151 if ( to . params . folderId == 'shared' ) { return RoleConst . ADMIN } else {
5252 return PermissionConst . KNOWLEDGE_DOCUMENT_READ . getWorkspacePermissionWorkspaceManageRole ( )
5353 }
54+ } ,
55+ ( ) => {
56+ const to : any = get_next_route ( )
57+ if ( to . params . folderId == 'share' ) {
58+ return new ComplexPermission ( [ RoleConst . EXTENDS_USER . getWorkspaceRole ( ) ] , [ PermissionConst . KNOWLEDGE_DOCUMENT_READ . getWorkspacePermission ( ) ] , [ ] , 'AND' ) }
59+ } ,
60+ ( ) => {
61+ const to : any = get_next_route ( )
62+ if ( to . params . folderId == 'share' ) {
63+ return RoleConst . USER . getWorkspaceRole ( ) }
5464 }
5565 ] ,
5666 } ,
@@ -89,6 +99,16 @@ const DocumentRouter = {
8999 const to : any = get_next_route ( )
90100 if ( to . params . folderId == 'shared' ) { return RoleConst . ADMIN } else { return PermissionConst . KNOWLEDGE_PROBLEM_READ . getWorkspacePermissionWorkspaceManageRole ( ) }
91101 } ,
102+ ( ) => {
103+ const to : any = get_next_route ( )
104+ if ( to . params . folderId == 'share' ) {
105+ return new ComplexPermission ( [ RoleConst . EXTENDS_USER . getWorkspaceRole ( ) ] , [ PermissionConst . KNOWLEDGE_PROBLEM_READ . getWorkspacePermission ( ) ] , [ ] , 'AND' ) }
106+ } ,
107+ ( ) => {
108+ const to : any = get_next_route ( )
109+ if ( to . params . folderId == 'share' ) {
110+ return RoleConst . USER . getWorkspaceRole ( ) }
111+ }
92112 ] ,
93113 } ,
94114 component : ( ) => import ( '@/views/problem/index.vue' ) ,
@@ -125,6 +145,16 @@ const DocumentRouter = {
125145 const to : any = get_next_route ( )
126146 if ( to . params . folderId == 'shared' ) { return RoleConst . ADMIN } else { return PermissionConst . KNOWLEDGE_HIT_TEST_READ . getWorkspacePermissionWorkspaceManageRole ( ) }
127147 } ,
148+ ( ) => {
149+ const to : any = get_next_route ( )
150+ if ( to . params . folderId == 'share' ) {
151+ return new ComplexPermission ( [ RoleConst . EXTENDS_USER . getWorkspaceRole ( ) ] , [ PermissionConst . KNOWLEDGE_HIT_TEST_READ . getWorkspacePermission ( ) ] , [ ] , 'AND' ) }
152+ } ,
153+ ( ) => {
154+ const to : any = get_next_route ( )
155+ if ( to . params . folderId == 'share' ) {
156+ return RoleConst . USER . getWorkspaceRole ( ) }
157+ }
128158 ] ,
129159 } ,
130160 component : ( ) => import ( '@/views/hit-test/index.vue' ) ,
@@ -172,6 +202,16 @@ const DocumentRouter = {
172202 if ( to . params . folderId == 'shared' ) { return RoleConst . ADMIN }
173203 else { return new ComplexPermission ( [ RoleConst . USER ] , [ PermissionConst . KNOWLEDGE . getKnowledgeWorkspaceResourcePermission ( to ? to . params . id : '' , ) ] , [ EditionConst . IS_EE , EditionConst . IS_PE ] , 'AND' ) }
174204 } ,
205+ ( ) => {
206+ const to : any = get_next_route ( )
207+ if ( to . params . folderId == 'share' ) {
208+ return new ComplexPermission ( [ RoleConst . EXTENDS_USER . getWorkspaceRole ( ) ] , [ PermissionConst . KNOWLEDGE_CHAT_USER_READ . getWorkspacePermission ( ) ] , [ ] , 'AND' ) }
209+ } ,
210+ ( ) => {
211+ const to : any = get_next_route ( )
212+ if ( to . params . folderId == 'share' ) {
213+ return RoleConst . USER . getWorkspaceRole ( ) }
214+ }
175215 ]
176216 } ,
177217 component : ( ) => import ( '@/views/chat-user/index.vue' ) ,
@@ -209,6 +249,16 @@ const DocumentRouter = {
209249 const to : any = get_next_route ( )
210250 if ( to . params . folderId == 'shared' ) { return RoleConst . ADMIN } else { return PermissionConst . KNOWLEDGE_EDIT . getWorkspacePermissionWorkspaceManageRole ( ) }
211251 } ,
252+ ( ) => {
253+ const to : any = get_next_route ( )
254+ if ( to . params . folderId == 'share' ) {
255+ return new ComplexPermission ( [ RoleConst . EXTENDS_USER . getWorkspaceRole ( ) ] , [ PermissionConst . KNOWLEDGE_EDIT . getWorkspacePermission ( ) ] , [ ] , 'AND' ) }
256+ } ,
257+ ( ) => {
258+ const to : any = get_next_route ( )
259+ if ( to . params . folderId == 'share' ) {
260+ return RoleConst . USER . getWorkspaceRole ( ) }
261+ }
212262 ] ,
213263 } ,
214264 component : ( ) => import ( '@/views/knowledge/KnowledgeSetting.vue' ) ,
0 commit comments