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.
Masquerade require to configure a block to access the user switch from.
A controller for a page with the switch form rendered and a link in the admin menu under /admin/people/masquerade would be great and allow the module to work out of the box.
Comment | File | Size | Author |
---|---|---|---|
#17 | after-patch-915756.png | 64.03 KB | chandrashekhar_srijan |
#13 | Screenshot 2022-12-01 at 10.57.02 AM.png | 414.94 KB | sahal_va |
Issue fork masquerade-915756
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #1
jruberto CreditAttribution: jruberto commentedI have this same problem (working on a site that has no sidebars, and thusly nowhere to sensibly place the masquerade block) and came up with this as a solution / workaround:
1 Make a panel page with the masquerade block as it's content.
2 Bookmark that page.
Simple and low-tech, but effective.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commented@jruberto
Thank you for your answer. Solution 1 is not for me as I do not make use of Panel. Solution 2/ sould ne ok but I do not understand what to do. Could you please explain how to achieve that ?
Comment #3
jruberto CreditAttribution: jruberto commentedIn my response 2 is the next step after 1. If you don't do 1, you can't do 2. ;-)
Perhaps there's some other way to display a block as a page -- yes: http://drupal.org/project/insert_block
So, using Insert Block you can make a page that contains the masquerade block. Then you can bookmark that page.
Comment #4
tnanek CreditAttribution: tnanek commentedIf by admin menu, you mean the menu provided through the admin module, there's a configuration page to add blocks to it. The path is:
admin/config/user-interface/admin
(I believe thats also a page without the admin module installed - at least that was true of the prior 6.x version). I just added the masquerade block to it; haven't tested it yet, but in theory this should work.If the above is true, then be sure that after you add the custom block (or in the particular case the masquerade block), you go to the rebuild tab and rebuild the menu.
A side note, this is not for using the admin toolbar which is now in Drupal Core. This is a tool I used on Drupal-6.x and I just prefer it to the toolbar, and it has more configuration options that I can locate.
I haven't tested it very much yet, so this may not update as needed for this to be a functional implementation.
EDIT: Sorry, I thought this was Drupal 7.x, my bad. In Drupal 6, though the same module works and there is a page to add blocks to it somewhere, though not at the same path.
Comment #5
1kenthomas CreditAttribution: 1kenthomas commentedhttp://drupal.org/project/admin_menu
Masquerade integration used to happen out of the box AFAIK.
Comment #6
skandalfish CreditAttribution: skandalfish commentedIt appears that it should indeed work out of the box. I've had no such luck, either. Currently running Drupal 6.22, as there are other inherited site issues that need to be resolved before the jump to 7. I think jruberto's 1-2 punch will suffice for now, as it will not see the constant use that would justify cluttering the user's dashboard.
Comment #7
1kenthomas CreditAttribution: 1kenthomas as a volunteer and commentedLet's pop this up to D8. What's the best way to integrate with Admin Toolbar?
Comment #8
andypostSuppose good idea pointed in #1836516-10: Port Masquerade to D8 and rewrite + simplify it into a new 2.x series and next comments
Comment #9
gagarine CreditAttribution: gagarine as a volunteer commentedA controller for a page with the bloc rendered and a link in the admin menu under /admin/people/masquerade would already be great.
Comment #10
gagarine CreditAttribution: gagarine as a volunteer commentedComment #13
sahal_va CreditAttribution: sahal_va at Axelerant commentedCreated a controller as suggested and rendered masquerade block in it.
Added new task under user collection page.
Please review and let me know if you have further suggestions
Comment #15
Leksat CreditAttribution: Leksat at Amazee Labs commentedI additionally added a menu link for better UX
And attached the current patch for better DX :)
Comment #16
Leksat CreditAttribution: Leksat at Amazee Labs commentedHm.. Maybe we should place the link at the same place where the "Unmasquerade" link appears?
Comment #17
chandrashekhar_srijan CreditAttribution: chandrashekhar_srijan at Srijan | A Material+ Company for Drupal India Association commentedThe above MR is applied successfully for Masquerade v8.x-2.x-dev. It is working.
Attaching the screenshot for the reference.
Test Steps: