SIGN IN SIGN UP

feat(webapp): put the admin dashboard behind an env var flag (#4774)

Adds an `ADMIN_DASHBOARD_ENABLED` env var (default: enabled) that turns
the admin dashboard and user impersonation off for an entire instance.

When disabled:
- every admin dashboard page redirects away, and the admin navigation
isn't rendered
- existing impersonation cookies are ignored, and any lingering session
is actively terminated with an audit record
- every flow that could start an impersonation responds 404, and no
impersonation tokens are minted

Stopping an impersonation always works regardless of the flag, so
nothing gets stuck. Machine-to-machine admin API endpoints are not
affected. The variable is documented for self-hosters; instances that
don't set it are unaffected.
S
Saadi Myftija committed
1eda438a413c5e59844045f7849305d7ef45cc1e
Parent: 45eaaa7
Committed by GitHub <noreply@github.com> on 8/25/2026, 1:37:43 PM