Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

MU Role Masquerade

No security coverage Maintenance fixes only

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, and administrator are never offered as targets.
  • Accurate UID 1 testing: Even user 1 loses the SuperUserAccessPolicy all-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_masquerade channel.

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_masquerade cache context and invalidates user/menu/local-task tags on switch.

Requirements & Compatibility

  • Drupal ^10.3 || ^11
  • Core user module (required)
  • Optional: Core toolbar, Core navigation, Gin admin theme

Quick Start

  1. Enable MU Role Masquerade.
  2. Go to People → Permissions and grant Use role masquerade plus the per-role Masquerade as ROLE permissions.
  3. Open Masquerade as role from your account menu or /admin/people/role-masquerade.
Drupal 10–11

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

Tracked releases
1
Tracked since
Nov 2026
Latest release
14 hours ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.0 Stable 10–11 Nov 19, 2026