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.
That's a quite common case that theme layout has not right place for Masquerade block, especially at development time. Therefore default admin theme (Seven) is built without sidebars and the block is forced to be in main content region. I propose attaching a simple floating button for masquerading / unmasquerading.
Comment | File | Size | Author |
---|---|---|---|
#6 | 2448271-6.patch | 547 bytes | andypost |
#3 | masquerade-ui_improvement-2448271-2.patch | 3.79 KB | Chi |
Comments
Comment #1
Chi CreditAttribution: Chi commentedComment #3
Chi CreditAttribution: Chi commentedCleanup
Comment #4
andypostThanx for idea, technical implementation suppose should be a bit different
This approach solves at last current regression of absence unmasquerade link (seems menu changes)
Also I thought about svg icon for right area of toolbar but toolbar is not enabled for authenticated users in standard profile so we need default menu link in any standard menus.
Having a dialog form to masquerade require to add setting for redirect or front route because modal have no referer to redirect
Comment #5
Chi CreditAttribution: Chi commentedMany sites do not use standard menus.
Comment #6
andypostTake a loot at comment and user module
*.links.menu.yml
files they provide links for standard profile. I just can't get why access for them is not checked right nowComment #7
Wim LeersSo, #6 is answered by #2463659: Regression test coverage: integration test for an uncacheable menu link that depends on session data, and is fixed by #1805054: Cache localized, access filtered, URL resolved, and rendered menu trees. Access now is correctly checked, even when menu blocks are render cached.
Comment #8
andypostIt makes sense to use the same approach as
\Drupal\user\Plugin\Menu\LoginLogoutMenuLink
does in core nowComment #9
Wim LeersThat makes sense :)
Comment #10
andypostPostponed on #2695779: Unmasquerade link appears for users with the permission: 'link to any page', regardless of masquerade status.
Comment #11
andypost