Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Just curious if Rules support is in the works anywhere.
Possible Conditions:
* Is Masquerading?
Possible Events:
* Began Masquerade-ing
* Stopped Masquerade-ing
Possible Actions:
* Start Masquerade-ing
* Stop Masquerade-ing
* Stop All Masquerade-ing
Comments
Comment #1
robertstaddon CreditAttribution: robertstaddon commentedThis would be an extremely valuable feature to add!
Comment #2
wjaspers CreditAttribution: wjaspers commentedThis request would depend on:
#1458418: Add masquerade events API
And therefore, this request had already been moved to (somehow I forgot about this post):
#1458334: Add Rules support
Comment #3
deekayen CreditAttribution: deekayen commentedI don't think we need an events API to support Rules. Rules is popular enough to get bumped ahead of a generic API integration if someone submitted a patch for it.
Comment #4
wjaspers CreditAttribution: wjaspers commentedThen, for example, the implementation of capturing when a user is about to masquerade would be:
I thought initially about going down this road, but it feels too tightly coupled.
Plus, in further thought, we could let other modules stop the masquerade based on custom requirements.
Comment #5
andypostlet's continue in this issue, marked as dumplicated #1458334: Add Rules support
suppose we just need to implement support in masquerade.rules.inc
Comment #6
citricguy CreditAttribution: citricguy commentedWhere should development of this feature continue? It seems like both the Masquerade and Masquerade Extras projects are assuming the other will implement the feature. This seems has been closed in the Masquerade Extras project and marked as a duplicate of this issue.
Comment #7
wjaspers CreditAttribution: wjaspers commented@citricguy
That's not quite the case.
The Masquerade module needs to fire the basic hooks necessary for rules to work. Otherwise, the rest of this is not possible.
(For example: module_invoke("masquerade_start")). This thread already suggests the basics for what would be required. #1547058: Add hooks when user starts or stops masquerading
My original suggestion was wrong because rules integration would be coupled to masquerade with hooks specific to rules.
All masquerade_extras would supply is the hooks/events that would be useful to rules.
Whether or not Masquerade's maintainers want that integration in this suite or elsewhere is up to them.
Comment #8
deekayen CreditAttribution: deekayen commentedI would commit a working patch for this.