feat(admin): impersonation banner, picker, and audit tab #50

Merged
zaelgohary merged 3 commits from development_admin_impersonate into development 2026-05-06 13:41:22 +00:00
Member

Summary

Phase I — wires the impersonation UI now that hero_proxy ships auth.impersonate / auth.stop_impersonating (PR45) + audit.list. The picker and "Stop" button hit the proxy directly at /hero_proxy/rpc/rpc (cookie session), since auth.impersonate rejects collab's UDS operator caller. The audit tab passes through collab → audit.list filtered to auth.impersonate* actions.

Refs #43.

Changes

  • Wired impersonate.audit.list to the proxy audit.list (merges auth.impersonate + auth.stop_impersonating entries, sorted desc).
  • Dropped impersonate.start / impersonate.stop handlers + spec entries — UI hits proxy directly.
  • Added ImpersonateBanner, ImpersonatePicker, ImpersonationAuditTab components.
  • Added AdminPage::ImpersonationAudit variant + sidebar entry + #/admin/impersonation-audit route.
  • Added proxy_rpc helper in the WASM client for cookie-session calls.
  • Added [[web.proxy]] mapping for /hero_proxy/rpc/rpc so dx serve forwards cookie calls to hero_router.

Test Results

3/3 new Playwright specs pass (audit tab, picker modal, banner gating). 28/28 standalone specs pass overall. cargo check --workspace clean.

## Summary Phase I — wires the impersonation UI now that hero_proxy ships `auth.impersonate` / `auth.stop_impersonating` (PR45) + `audit.list`. The picker and "Stop" button hit the proxy directly at `/hero_proxy/rpc/rpc` (cookie session), since `auth.impersonate` rejects collab's UDS operator caller. The audit tab passes through collab → `audit.list` filtered to `auth.impersonate*` actions. ## Related Issue Refs #43. ## Changes - Wired `impersonate.audit.list` to the proxy `audit.list` (merges `auth.impersonate` + `auth.stop_impersonating` entries, sorted desc). - Dropped `impersonate.start` / `impersonate.stop` handlers + spec entries — UI hits proxy directly. - Added `ImpersonateBanner`, `ImpersonatePicker`, `ImpersonationAuditTab` components. - Added `AdminPage::ImpersonationAudit` variant + sidebar entry + `#/admin/impersonation-audit` route. - Added `proxy_rpc` helper in the WASM client for cookie-session calls. - Added `[[web.proxy]]` mapping for `/hero_proxy/rpc/rpc` so dx serve forwards cookie calls to hero_router. ## Test Results 3/3 new Playwright specs pass (audit tab, picker modal, banner gating). 28/28 standalone specs pass overall. `cargo check --workspace` clean.
zaelgohary merged commit 113c50a2e9 into development 2026-05-06 13:41:22 +00:00
zaelgohary deleted branch development_admin_impersonate 2026-05-06 13:41:22 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_collab!50
No description provided.