(to: any)
| 66 | } |
| 67 | |
| 68 | const accessCrossPermission = (to: any) => { |
| 69 | if (!to?.path) return false |
| 70 | return ( |
| 71 | (to.path.startsWith('/system') && !userStore.isAdmin) || |
| 72 | (to.path.startsWith('/set') && !userStore.isSpaceAdmin) || |
| 73 | (isWsAdminRouter(to) && !userStore.isSpaceAdmin) |
| 74 | ) |
| 75 | } |
| 76 | |
| 77 | const isWsAdminRouter = (to?: any) => { |
| 78 | return wsAdminRouterList.some((item: string) => to?.path?.startsWith(item)) |
no test coverage detected