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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user