feat : ajout d'un système de log pour les SUPER_ADMIN

This commit is contained in:
2026-03-30 09:52:06 +02:00
parent e74a264b37
commit d949e3a730
26 changed files with 1107 additions and 17 deletions

View File

@@ -0,0 +1,12 @@
export default defineNuxtRouteMiddleware(async () => {
const auth = useAuthStore()
if (!auth.checked) {
await auth.ensureSession()
}
const isSuperAdmin = auth.user?.roles?.includes('ROLE_SUPER_ADMIN')
if (!isSuperAdmin) {
return navigateTo('/')
}
})