feat: add role negation and negate some routes to admins
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user