feat(webapp): put the admin dashboard behind an env var flag - #4774
Conversation
- Plain customer cards no longer render the impersonate button or mint tokens - /@/runs quick-nav 404s instead of running its cross-org lookup - stopping always audits and clears via an ungated cookie reader, and the root loader actively terminates lingering sessions so a later flag flip cannot resurrect them - flag documented for self-hosters; tests pin the default, the disabled state, and the stop path
|
WalkthroughThe pull request renames 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 18.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 22 functions across 15 files. (3 skipped: 3 unsupported.) Full details: Description checkExplanation The description accurately explains the feature and its disabled-state behavior, but it omits the required issue reference, checklist, Testing, Changelog, and Screenshots sections from the repository template. ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Preview Deployment
|
Observability mapAs of 19/100 over 449 measured of 467 entry points (base 19, no change) What this PR changed
FIX FIRST
AUDIT 3 of 50 sensitive mutations record an actor. 47 without one. What the score is made ofThe score and findings here are report-only and never gate the merge. Separately, a required test suite keeps this tool's symbol and route lists in sync with the code they name, and can fail a pull request that renames or removes a symbol they reference, or that adds the first route with a segment they anticipate. Each failure names the list to edit. The rules and their reasons: internal-packages/observability-map/README.md. |
…ADMIN_DASHBOARD_ENABLED The requireSuper authorization branch now honors the flag, so every admin dashboard page redirects away when disabled; the display-permission booleans and useHasAdminAccess follow suit, hiding the admin nav affordances. The hand-rolled admin.data-stores checks get the same gate.
Adds an
ADMIN_DASHBOARD_ENABLEDenv var (default: enabled) that turns the admin dashboard and user impersonation off for an entire instance.When disabled:
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.