Rules switch user
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
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.
