aryehraber/statamic-impersonator
A Statamic addon that lets control panel users impersonate other accounts, logging in as them to troubleshoot issues or preview permissions, then switch back to their original user with a single click.
Package role: A Laravel authentication/session extension that lets a privileged user assume another user's identity (impersonation) without knowing their credentials. v2.6.0 is a single-line patch release with no API surface changes.
Architecture fit
Auth::user() call sites without a rewrite.users table as a side effect of session start deserves a data-ownership review.Integration feasibility
composer require, publish config, add trait to the User model, register middleware, expose a guarded route/controller action. Realistic estimate: 1–3 engineering days including tests, plus review.Technical risk
can:impersonate check converts a convenience feature into an account-takeover path.last_login. That silently corrupts login analytics, security reporting, and any "dormant user" or anomaly-detection logic built on that column. Post-fix, "last login" once again means "the user actually authenticated," which is the semantics auditors expect.Key questions
last_login (or equivalent) consumed by security monitoring, licensing, or customer-facing reporting that this fix would shift?Stack fit
users table, Eloquent auth provider, and session-based guard. Non-standard setups (API tokens only, SSO-only, stateless SPA with Sanctum) need explicit validation — impersonation semantics under stateless auth are materially different.Migration path
User model; publish and review the config file line by line rather than accepting defaults.canImpersonate) with explicit role/tenant scoping, not a blanket admin check.Compatibility
Sequencing
last_login fix is in place from day one; retrofitting audit semantics later is harder than starting clean.Maintenance
Support
Scaling
Failure modes
last_login. Pre-brief stakeholders if any dashboard depends on it.Ramp-up
How can I help you explore Laravel packages today?