generated from nhcarrigan/template
feat: security and auditing
This commit is contained in:
@@ -33,7 +33,8 @@ import { AuthService } from '../../services/auth.service';
|
||||
@if (authService.user(); as user) {
|
||||
<span class="welcome">Welcome, {{ user.username }}!</span>
|
||||
@if (user.isAdmin) {
|
||||
<span class="admin-badge">Admin</span>
|
||||
<a routerLink="/admin/users" class="admin-badge">Users</a>
|
||||
<a routerLink="/admin/audit" class="admin-badge">Audit</a>
|
||||
}
|
||||
<button (click)="logout()" class="btn btn-secondary">Logout</button>
|
||||
} @else {
|
||||
@@ -111,6 +112,14 @@ import { AuthService } from '../../services/auth.service';
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 4px;
|
||||
font-size: 0.8rem;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.admin-badge:hover {
|
||||
background-color: var(--witch-plum);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.btn {
|
||||
|
||||
Reference in New Issue
Block a user