Added conditions to check role after connexion and changed guards
This commit is contained in:
@@ -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 -->
|
||||
|
||||
Reference in New Issue
Block a user