mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-09 02:47:45 +08:00
Route audit admins into admin console
This commit is contained in:
@@ -117,7 +117,7 @@ async function syncExternalAuthState(nextToken: string | null): Promise<void> {
|
||||
return
|
||||
}
|
||||
|
||||
if (router.currentRoute.value.path.startsWith('/admin') && user.role !== 'admin') {
|
||||
if (router.currentRoute.value.path.startsWith('/admin') && !authStore.canAccessAdmin) {
|
||||
await router.replace('/dashboard')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user