feat(auth): implement RBAC audit logging and session security

Integrate granular audit logging for admin actions, transition to role-based API access via `requireAdminApiSession`, and update session tokens to persist user roles and IDs for consistent multi-admin management.
This commit is contained in:
Team Dark Devil committed 2026-11-20 18:48:54 +06:00
1 parent 2873b9904a
commit 5c977d6977
37 files changed
+5939 -349

No files matched your search

+1
View File
@@ -13,6 +13,7 @@ function isProtectedApi(pathname: string, method: string) {
if (pathname === "/api/auth/setup" && method === "POST") return false;
if (pathname === "/api/events" && method === "POST") return false;
if (pathname === "/api/health" && method === "GET") return false;
if (pathname === "/api/prometheus" && method === "GET") return false;
return pathname.startsWith("/api/");
}