MCPcopy Index your code
hub / github.com/dataease/SQLBot / accessCrossPermission

Function accessCrossPermission

frontend/src/router/watch.ts:68–75  ·  view source on GitHub ↗
(to: any)

Source from the content-addressed store, hash-verified

66}
67
68const 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
77const isWsAdminRouter = (to?: any) => {
78 return wsAdminRouterList.some((item: string) => to?.path?.startsWith(item))

Callers 1

watchRouterFunction · 0.85

Calls 1

isWsAdminRouterFunction · 0.85

Tested by

no test coverage detected