Implement AuthGuard for route protection, integrate authorization checks into particles route, and simplify HeaderComponent access logic. Remove redundant debug logging in auth.service.ts.

This commit is contained in:
2025-08-02 22:27:37 +02:00
parent 7f1c59d102
commit 1f03a4bdc3
4 changed files with 50 additions and 10 deletions
+6 -1
View File
@@ -1,4 +1,5 @@
import {Routes} from '@angular/router';
import {AuthGuard} from './guards/auth.guard';
export const routes: Routes = [
{
@@ -7,7 +8,11 @@ export const routes: Routes = [
},
{
path: 'particles',
loadComponent: () => import('./pages/particles/particles.component').then(m => m.ParticlesComponent)
loadComponent: () => import('./pages/particles/particles.component').then(m => m.ParticlesComponent),
canActivate: [AuthGuard],
data: {
requiredAuthorizations: ['SCOPE_head_mod']
}
},
{
path: 'map',