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.

Issue fork masquerade-915756

Command icon 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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jruberto’s picture

I 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.

Anonymous’s picture

@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 ?

jruberto’s picture

In 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.

tnanek’s picture

If 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.

1kenthomas’s picture

http://drupal.org/project/admin_menu

Masquerade integration used to happen out of the box AFAIK.

skandalfish’s picture

Version: 6.x-1.4 » 6.x-1.7

It 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.

1kenthomas’s picture

Version: 6.x-1.7 » 8.x-2.x-dev
Issue summary: View changes

Let's pop this up to D8. What's the best way to integrate with Admin Toolbar?

andypost’s picture

gagarine’s picture

Title: How to add masquerade features in admin menu ? » Add masquerade in admin menu and create a page
Category: Support request » Feature request
Issue summary: View changes

A controller for a page with the bloc rendered and a link in the admin menu under /admin/people/masquerade would already be great.

gagarine’s picture

Issue summary: View changes

sahal_va made their first commit to this issue’s fork.

sahal_va’s picture

Status: Active » Needs review
FileSize
414.94 KB

Created a controller as suggested and rendered masquerade block in it.
Added new task under user collection page.

Masquerade Block

Please review and let me know if you have further suggestions

Leksat made their first commit to this issue’s fork.

Leksat’s picture

I additionally added a menu link for better UX

And attached the current patch for better DX :)

Leksat’s picture

Hm.. Maybe we should place the link at the same place where the "Unmasquerade" link appears?

chandrashekhar_srijan’s picture

FileSize
64.03 KB

The above MR is applied successfully for Masquerade v8.x-2.x-dev. It is working.
Attaching the screenshot for the reference.
Test Steps: