See the app as one of your people

An admin can switch the interface into another role — or a specific named person — to check exactly what that person sees before rolling out a change.

What it is

A client-side view-as mode stored in session storage so it resets when the tab closes. It carries either a bare role and crew, or a specific person's identity, and flows that record who performed an action read the impersonated identity so test data looks realistic rather than being attributed to the admin.

Also called: view as · impersonate a user · preview what my crew sees · test permissions

See it
See the app as one of your people
Area
Platform & Admin
Group
Roles & permissions
System
Multi-Tenancy & Identity
Solves
3 named problems
01setImpersonation() writes role, crew and optional identity into session storage.
02getEffectiveRole() returns the impersonated role for admins and the real role for everyone else.
03getEffectiveUser() returns the impersonated person for flows that need a named actor, such as acceptance signatures.
The 'viewing as Crew Leader' banner across the top with the nav visibly reduced underneath. src/lib/RoleContext.tsx driving src/components/layout/Sidebar.tsx. Sample data — no customer information appears here.
How it works
  1. 1setImpersonation() writes role, crew and optional identity into session storage.
  2. 2getEffectiveRole() returns the impersonated role for admins and the real role for everyone else.
  3. 3getEffectiveUser() returns the impersonated person for flows that need a named actor, such as acceptance signatures.
  4. 4The platform console's open-as picker bridges impersonation across hosts by passing viewAs parameters in the URL, which RoleContext reads on landing and then strips from the address bar.
  5. 5Only an admin's impersonation is honoured; a non-admin with a stale value is ignored.
Why we built it

Two design notes explain the shape. Storage: 'stored in sessionStorage so it resets on tab close' — an impersonation that survives a browser restart is one someone forgets they are in. The cross-host bridge exists because 'sessionStorage is host-scoped — couldn't write impersonation state into the tenant from the admin page directly', and the parameters are stripped after landing 'so a manual share or refresh doesn't carry the impersonation forward.' Carrying the person, not just the role, is what makes signatures and audit rows attribute correctly during a walkthrough.

The problem
  • Permission changes could only be verified by logging in as someone else.
  • Impersonation that persisted across sessions caused admins to act in the wrong mode.
  • Actions taken while previewing were attributed to the admin, producing misleading records.
Sound familiar?
What you get
You can check a role's view in seconds without borrowing an account.
Preview mode ends when the tab closes.
Recorded actions name the person being previewed, so walkthrough data reads correctly.

See it on your own jobs

Twenty minutes, your numbers, no slide deck. We’ll build one of your real buildings in front of you and send you the estimate link at the end — yours to keep either way.

or keep browsing features →