feat: add role negation and negate some routes to admins

This commit is contained in:
2026-06-17 22:27:03 +02:00 Unverified
parent 3315a9ce6e
commit ed0e12b1b6
4 changed files with 45 additions and 9 deletions
+4 -4
View File
@@ -26,15 +26,15 @@ onUnmounted(() => {
}
})
const { isAuthenticated, user, logout } = useAuth()
const panelLabel = computed(() => isAdmin(user.value?.role) ? 'Pannello' : 'Dashboard')
const navLinks = [
{ name: 'Home', path: '/' },
{ name: 'Fai una segnalazione', path: '/reports/new' },
...(isCitizen(user.value?.role) ? [{ name: 'Fai una segnalazione', path: '/reports/new' }] : []),
{ name: 'Esplora i dati', path: '/open-data' },
{ name: 'Come funziona', path: '/info' }
]
const { isAuthenticated, user, logout } = useAuth()
const panelLabel = computed(() => isAdmin(user.value?.role) ? 'Pannello' : 'Dashboard')
</script>
<template>