Added conditions to check role after connexion and changed guards

This commit is contained in:
2026-06-01 10:41:50 +01:00
parent cf53e4c8ef
commit 80b4726004
22 changed files with 142 additions and 92 deletions
+4 -4
View File
@@ -59,14 +59,14 @@
</li>
</ul>
</li>
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
@if (authService.hasRole(['ADMIN'])) {
@if (admin()) {
<li nz-menu-item routerLinkActive="ant-menu-item-selected">
<a routerLink="/user">
<nz-icon nzType="user"></nz-icon>
<span>Utilisateur</span>
</a>
}
</li>
</li>
}
</ul>
<!-- ICONES À DROITE -->