Fix jwt-token
This commit is contained in:
@@ -79,6 +79,7 @@ function App() {
|
||||
<Alerts />
|
||||
</ErrorBoundary>
|
||||
} />
|
||||
<Route path="security-logs" element={<SecurityLogs />} />
|
||||
<Route path="settings" element={<Settings />} />
|
||||
<Route path="debug" element={<Debug />} />
|
||||
</Route>
|
||||
|
||||
@@ -20,7 +20,8 @@ import {
|
||||
SignalIcon,
|
||||
WifiIcon,
|
||||
BugAntIcon,
|
||||
CogIcon
|
||||
CogIcon,
|
||||
ShieldCheckIcon
|
||||
} from '@heroicons/react/24/outline';
|
||||
import classNames from 'classnames';
|
||||
|
||||
@@ -66,6 +67,11 @@ const Layout = () => {
|
||||
|
||||
const nav = [...baseNavigation];
|
||||
|
||||
// Add Security Logs if user is admin
|
||||
if (user.role === 'admin') {
|
||||
nav.push({ name: t('navigation.security_logs'), href: '/security-logs', icon: ShieldCheckIcon });
|
||||
}
|
||||
|
||||
// Add Settings if user has any settings permissions
|
||||
if (canAccessSettings(user.role)) {
|
||||
nav.push({ name: t('navigation.settings'), href: '/settings', icon: CogIcon });
|
||||
|
||||
@@ -8,7 +8,8 @@ const translations = {
|
||||
alerts: 'Alerts',
|
||||
settings: 'Settings',
|
||||
logout: 'Logout',
|
||||
map: 'Map View'
|
||||
map: 'Map View',
|
||||
security_logs: 'Security Logs'
|
||||
},
|
||||
dashboard: {
|
||||
title: 'System Overview',
|
||||
|
||||
Reference in New Issue
Block a user