Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

Role Switcher Session

No security coverage Under active development

This module allows logged-in users with multiple custom roles to temporarily switch to a single active role for their current browser session, without altering database records or needing administrator intervention. Users can select a role from a dropdown block, and a special option quickly reverts them to all their original roles. The administrator role is always preserved, ensuring no lockout potential.

Role Switcher lets any logged-in user who holds multiple custom roles pick which single role is active for their current browser session — without modifying the database or requiring any admin involvement.

Features

- Users can switch between their assigned custom roles from a dropdown block
- Session-based switching — no database changes, no permanent role modification
- "All my original roles" option instantly reverts to full original role set
- Administrator role is never lost — lockout-proof by design
- Block auto-placed in header on install — zero manual Block Layout setup
- Works transparently with all Drupal access checks (routing, Views, Twig, custom access checkers)
- Per-session switching — different browsers are fully independent
- Compatible with Drupal 10 and Drupal 11

Post-Installation

No configuration required. After enabling the module:
1. The "Role Switcher" block appears automatically in the header region
2. Any user with 2 or more custom roles will see an "Acting as" dropdown
3. Select a role to switch — or select "All my original roles" to revert
4. Logging out always resets to the full original role set

Additional Requirements

No additional modules or libraries required. Only Drupal core (drupal:user) is needed.

None required. Works out of the box with any Drupal 10/11 installation.

Ask your assistant about Role Switcher Session

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

No dependencies recorded for this project.

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
2
Tracked since
Jul 2026
Latest release
4 months ago
Releases (12 mo)
2 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
1.0.x-dev Dev 10–11 Jul 6, 2026
1.0.0 Stable Jul 3, 2026