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.
When you're an anonymous user, the Masquerade block can take between 500ms and 1 second to figure out if the anonymous user has access to masquerade. Since anonymous users should not be able masquerade ever, we should exist out early perhaps?
Comment | File | Size | Author |
---|---|---|---|
#8 | 2880908-8.patch | 2.31 KB | andypost |
| |||
#8 | interdiff.txt | 549 bytes | andypost |
#7 | interdiff.txt | 725 bytes | andypost |
Comments
Comment #2
japerryComment #3
andypostGood point! I guess you mean s/exist/exit
Comment #5
andypostprobably it needs test cos removal of context but looks forbidden does not need this context it will be added only when block supposed to be rendered
Attaching patch cos module branches does not work well now
Comment #6
andypostAdded test and improved comment
Comment #7
andypostReverted cache context to decide on it in #2900413: Allow UnMasquerade link in the "Masquerade" block
Comment #8
andypostAnd the last polishing
Comment #10
andypostFixed
Comment #12
DuneBLBefore this commit I was using (a lot) the masquerade feature even for anonymous user on my DEV site.
It is very handy because it allows me to test several user profiles very quickly.
The permission to display the masquerade block for anonymous users can be set in the permission page.
After this commit, setting the permission for anonymous user doesn't work anymore which is bad.
I think that we can revert this commit to provide more flexibility.
Comment #13
andypostThat's sounds strange, DuneBL, because masquerade as anonymous user is not supported starting from d7 (project page points about it - use private browsing or log off)
Comment #14
DuneBL@andypost: I don't know what to say... It was working as I said until I update the module 2 days ago...