From 3a143c72c5f90071156b04fd0f34a26776f919ce Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Wed, 24 Sep 2025 05:19:41 +0200 Subject: [PATCH] Fix jwt-token --- client/src/App.jsx | 1 + client/src/components/Layout.jsx | 8 +++++++- client/src/utils/tempTranslations.js | 3 ++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/client/src/App.jsx b/client/src/App.jsx index 888141f..4bdbea0 100644 --- a/client/src/App.jsx +++ b/client/src/App.jsx @@ -79,6 +79,7 @@ function App() { } /> + } /> } /> } /> diff --git a/client/src/components/Layout.jsx b/client/src/components/Layout.jsx index 1da94f6..35d561a 100644 --- a/client/src/components/Layout.jsx +++ b/client/src/components/Layout.jsx @@ -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 }); diff --git a/client/src/utils/tempTranslations.js b/client/src/utils/tempTranslations.js index 48a361e..890cf1b 100644 --- a/client/src/utils/tempTranslations.js +++ b/client/src/utils/tempTranslations.js @@ -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',