mirror of
https://github.com/langgenius/dify.git
synced 2026-09-08 19:15:59 +08:00
tweaks
This commit is contained in:
parent
093664757f
commit
eb56a2c6fc
@ -14,9 +14,6 @@ export default function RoleRouteGuard({ children }: { children: ReactNode }) {
|
|||||||
const shouldGuardRoute = datasetOperatorRedirectRoutes.some(route => isPathUnderRoute(pathname, route))
|
const shouldGuardRoute = datasetOperatorRedirectRoutes.some(route => isPathUnderRoute(pathname, route))
|
||||||
const shouldRedirect = shouldGuardRoute && !isLoadingCurrentWorkspace && isCurrentWorkspaceDatasetOperator
|
const shouldRedirect = shouldGuardRoute && !isLoadingCurrentWorkspace && isCurrentWorkspaceDatasetOperator
|
||||||
|
|
||||||
if (shouldGuardRoute && isLoadingCurrentWorkspace)
|
|
||||||
return null
|
|
||||||
|
|
||||||
if (shouldRedirect)
|
if (shouldRedirect)
|
||||||
return redirect('/datasets')
|
return redirect('/datasets')
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user