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