Screenshot showing the rules switch user bracketing

This project is not covered by Drupal’s security advisory policy.

This module adds two new Rules actions:

  • Switch to another user
  • Switch back from another user

These actions could be useful when you have an operation that you want an unprivileged user to use but it fails because the user doesn't have sufficient permissions.
Warning: You really must not forget to add the second action and switch back from the privileged user. Otherwise the current user will be logged in as the switched-to user. I have therefore grouped these two actions in a separate group "User switching" in the rules UI as a sort of gentle reminder (it would be nicer probably to build in some fail-safe that switches back after a rule has been executed automatically).

The first action offers to pass an argument so you can specify a dedicated user with just the right permission instead of using the user 1 account. Still this is probably not the most secure module.
Note: If badly configured, e.g. an operation in between the switch-to and the switch-back fails, it seems possibly that the current user will have all privileges of the switched-to user.

In order to use this with VBO also have a look at this issue #1800568: Set permission impossible which kindly explains how to get unprivileged users to see actions that require permissions they don't have.

Project information

  • caution Minimally maintained
    Maintainers monitor issues, but fast responses are not guaranteed.
  • caution Maintenance fixes only
    Considered feature-complete by its maintainers.
  • chart icon189 sites report using this module
  • Created by miiimooo on , updated
  • shield alertThis project is not covered by the security advisory policy.
    Use at your own risk! It may have publicly disclosed vulnerabilities.

Releases