fix(ui): rollenbasierte Navigation + domain_auditor-Support
- useAuth.ts: domain_auditor (Level 3) in roleLevels ergänzt - navbar.tsx: IMAP/POP3-Links nur noch für user + domain_admin; domain_auditor bekommt Zugang zum Admin-Bereich - UserNav.tsx: Rollenbezeichnung deutsch + leserlich (domain_auditor → "Domain-Auditor"); Badge ausgeblendet wenn Username = Rollenname Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -7,11 +7,12 @@ import { getCachedUser, setCachedUser } from "@/lib/auth-cache";
|
||||
|
||||
export { clearAuthCache } from "@/lib/auth-cache";
|
||||
|
||||
// Role hierarchy: superadmin(5) > domain_admin(4) > admin(3) > auditor(2) > user(1)
|
||||
// Role hierarchy: superadmin(5) > domain_admin(4) > domain_auditor(3) > auditor(2) > user(1)
|
||||
const roleLevels: Record<string, number> = {
|
||||
user: 1,
|
||||
auditor: 2,
|
||||
admin: 3,
|
||||
domain_auditor: 3,
|
||||
admin: 3, // legacy alias
|
||||
domain_admin: 4,
|
||||
superadmin: 5,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user