MU Role Masquerade lets authorized users temporarily act with a different set of roles while keeping their own user account (UID). It is built for safe permission, menu, and access troubleshooting on staging and production sites without switching to another user's account.
Why MU Role Masquerade?
Traditional masquerade modules switch your entire user identity to another account, which can muddy audit logs, expose another user's private state, or require creating temporary user accounts. MU Role Masquerade keeps your own UID and decorates your session account's roles on the request:
- No privilege escalation: You can only assume role sets whose permissions are a strict subset of your real permissions.
- Locked & admin roles excluded:
anonymous,authenticated, andadministratorare never offered as targets. - Accurate UID 1 testing: Even user 1 loses the
SuperUserAccessPolicyall-access bypass while masquerading, so you experience the assumed roles' actual permissions. - Full audit trail: Because your UID never changes, watchdog/dblog entries and entity authors still record your real account, and start/stop/logout transitions are logged to the
mu_role_masqueradechannel.
Key Features
- Multi-role selection: Assume one or more configurable roles at once.
- Direct role switching: Switch from one assumed role set to another without having to switch back first.
- Always-visible exit path: A sticky high-contrast top banner appears while masquerading—even if the assumed roles lack
access toolbar—and respects Drupal Toolbar, Core Navigation, and Gin displace offsets. - Toolbar & Navigation integration: Highlights an active-masquerade tray in Core Toolbar and adds Switch back to the account menu and Core Navigation user flyout.
- Destination-aware Switch back: Returning from the banner, toolbar, or account menu brings you right back to the page you were testing.
- Session-only & logout-safe: Masquerade state lives in the session and is automatically cleared on logout.
- Cache-aware: Includes a dedicated
mu_role_masqueradecache context and invalidates user/menu/local-task tags on switch.
Requirements & Compatibility
- Drupal
^10.3 || ^11 - Core
usermodule (required) - Optional: Core
toolbar, Corenavigation, Gin admin theme
Quick Start
- Enable MU Role Masquerade.
- Go to People → Permissions and grant Use role masquerade plus the per-role Masquerade as ROLE permissions.
- Open Masquerade as role from your account menu or
/admin/people/role-masquerade.
Ask your assistant about MU Role Masquerade
Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works
Depends on
Dependencies of the latest stable release
- user Drupal core
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | PHP | Release date | |
|---|---|---|---|---|---|
| 1.0.0 | Stable | 10–11 | Nov 19, 2026 |