Fix jwt-token

This commit is contained in:
2025-09-14 09:48:51 +02:00
parent cfa1af0fd0
commit 674c2e2d8f
3 changed files with 30 additions and 15 deletions

View File

@@ -36,13 +36,6 @@ const Layout = () => {
// Build navigation based on user permissions
const navigation = React.useMemo(() => {
console.log('🔍 Layout navigation recalculating:', {
userExists: !!user,
userRole: user?.role,
canAccessSettings: user?.role ? canAccessSettings(user.role) : false,
hasDebugPermission: user?.role ? hasPermission(user.role, 'debug.access') : false
});
if (!user?.role) {
return baseNavigation; // Return base navigation if user not loaded yet
}
@@ -59,7 +52,6 @@ const Layout = () => {
nav.push({ name: 'Debug', href: '/debug', icon: BugAntIcon });
}
console.log('✅ Navigation built:', nav.map(n => n.name));
return nav;
}, [user]);