204 WP-NN/RB-NN comments named a closed ticket instead of the code they sit next to. git blame already records history and stays correct when code moves; the comment does not. This sweep removes the reference and keeps the sentence, across 95 files in apps/ and libs/ plus the behaviour-spec generator's header text. Eleven references stay: five story files justify an a11y disable per the README's rule, and one line in a11y.mdx documents that convention. Two sentences needed a rewrite, not a deletion, so the reference's meaning survives its removal. behaviour-spec.mdx is regenerated, not hand-edited. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
55 lines
2.2 KiB
TypeScript
55 lines
2.2 KiB
TypeScript
import { Routes } from '@angular/router';
|
|
import { ShellComponent } from '@shared/layout/shell/shell.component';
|
|
import { authGuard, capabilityGuard } from '@auth/auth.guard';
|
|
|
|
export const routes: Routes = [
|
|
{
|
|
path: '',
|
|
component: ShellComponent, // persistent header/footer; only children swap
|
|
children: [
|
|
{ path: '', pathMatch: 'full', redirectTo: 'login' },
|
|
{
|
|
path: 'login',
|
|
loadComponent: () => import('@auth/ui/login.page').then((m) => m.LoginPage),
|
|
},
|
|
{
|
|
path: 'dashboard',
|
|
canActivate: [authGuard],
|
|
loadComponent: () =>
|
|
import('@behandeling/ui/werkvoorraad.page').then((m) => m.WerkvoorraadPage),
|
|
},
|
|
{
|
|
path: 'aanvraag/:id',
|
|
// Same capability the werkvoorraad list itself is gated by — the
|
|
// detail page is reachable only from a row already filtered to that capability.
|
|
canActivate: [capabilityGuard('aanvraag:beoordelen')],
|
|
loadComponent: () =>
|
|
import('@behandeling/ui/beoordeling.page').then((m) => m.BeoordelingPage),
|
|
},
|
|
{
|
|
path: 'beheer/stamdata',
|
|
// Admin-only stamdata maintenance editor (ADR-0004): capabilityGuard denies-by-default
|
|
// unless GET /me resolved `stamdata:edit` (Admin role). Backend re-enforces via the
|
|
// StamdataAdmin gate — the guard just avoids loading a page that would 403.
|
|
canActivate: [capabilityGuard('stamdata:edit')],
|
|
loadComponent: () => import('@beheer/ui/stamdata.page').then((m) => m.StamdataPage),
|
|
},
|
|
{
|
|
path: 'beheer/audit',
|
|
// Admin-only authz/PII-reveal audit trail. capabilityGuard denies-by-default
|
|
// unless GET /me resolved `cases:manage` (reused for audit read). Backend re-enforces.
|
|
canActivate: [capabilityGuard('cases:manage')],
|
|
loadComponent: () => import('@beheer/ui/audit.page').then((m) => m.AuditPage),
|
|
},
|
|
{
|
|
path: 'beheer/functies',
|
|
// Admin-only feature-flag toggles, gated by `flags:manage`.
|
|
canActivate: [capabilityGuard('flags:manage')],
|
|
loadComponent: () =>
|
|
import('@beheer/ui/feature-flags.page').then((m) => m.FeatureFlagsPage),
|
|
},
|
|
{ path: '**', redirectTo: 'login' },
|
|
],
|
|
},
|
|
];
|