Frontend admin console: Users, AI Policy, Audit Log

↗ view on GitHub · Claude · 2026-05-15 · 7d44fef6

Adds the admin-only /admin section reachable from the user dropdown
when the JWT role is admin. Mirrors the backend admin API:

  /admin/users    list, change role/status, delete (with self-guard
                  and last-admin guard already enforced server-side)
  /admin/policy   org system prompt, allow_external_models toggle,
                  user-instructions toggle, default model, retention,
                  timezone, banner text, and the jurisdiction/
                  practice-area/sector/allowed-domain lists
  /admin/audit    paginated audit log with action + user filters

Layout enforces role=admin client-side and the backend re-checks via
requireAdmin so the gate is real, not cosmetic.
Repository cpatpa/PIP
Author Claude <noreply@anthropic.com>
Authored
Parents 1587d287
Stats 7 files changed , +961
Part of Phases 4-8 - admin backend, local storage driver, local LLM, Docker, admin/account frontend

Capture this commit into my fork

Download a Markdown prompt that tells Claude how to port this exact commit into your working tree. Run it via claude -p < capture-commit-7d44fef6.md from inside the repo you want the change in.

⬇ Download capture-commit-7d44fef6.md