AddThisFeature

User Impersonation

See exactly what the user reporting the bug sees.

moderate Admin & Operations

What it adds

Let an admin sign in as a user to debug their problem — safely and traceably.

What your agent is told to do

4
  1. 1

    Restrict impersonation to admins, enforced server-side.

  2. 2

    Show a loud, permanent banner while impersonating. There must be zero ambiguity about who you are.

  3. 3

    Provide a one-click return to your own account.

  4. 4

    Log every impersonation: who, whom, when, and for how long.

Edge cases it handles

5
  • Impersonation must NOT be usable to perform destructive or billing actions — decide what's blocked and block it.
  • The impersonated user's own session must not be affected or terminated.
  • Admins must not be able to impersonate other admins without an extra check.
  • Actions taken while impersonating must be attributable to the ADMIN in the audit log, not to the user.
  • The banner must survive navigation and page reloads.

Definition of done

8
  • Only admins can impersonate, enforced server-side.
  • An unmissable banner shows at all times while impersonating.
  • Returning to the admin account is one click.
  • Every impersonation is logged with both identities.
  • Actions are attributed to the admin, not the impersonated user.
  • Destructive and billing actions are blocked while impersonating.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.