Fix jwt-token

This commit is contained in:
2025-09-24 05:19:41 +02:00
parent 1a72774848
commit 3a143c72c5
3 changed files with 10 additions and 2 deletions

View File

@@ -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>

View File

@@ -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 });

View File

@@ -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',