diff --git a/core/core-frontend/src/permission.ts b/core/core-frontend/src/permission.ts index a6226384bf..550d8bf2a1 100644 --- a/core/core-frontend/src/permission.ts +++ b/core/core-frontend/src/permission.ts @@ -49,6 +49,11 @@ router.beforeEach(async (to, from, next) => { return pre }, {}) } + if (!pathValid(to.path) && to.path !== '/404' && !to.path.startsWith('/de-link')) { + const firstPath = getFirstAuthMenu() + next({ path: firstPath || '/404' }) + return + } next() return }