Closed jwfuller closed 4 years ago
Basically, you masquerade as some else by
edit-masquerade-as-user :
edit-masquerade-as-any-user :
edit-administer-masquerade :
edit-masquerade-as-admin : grants access to user/1.
for WebExp Administrators
for WebExp Developers
Here, set the roles that are considered 'administrators': This means, the roles that cannot be masqueraded as. I recommend that 'developer' and 'administrator' are set as Masquerade admins.
is problematic. The best solution is to use the Masquerade block which allows easy switching and un-switching. I suggest we programmatically place the block in the Site Information area. Only roles with 'edit-masquerade-as-user' or 'edit-masquerade-as-any-user' can see the Masquerade Block.
Sorry if I missed this in our discussion of this issue in our meeting yesterday, but are we using masquerade presently? Or is this something that we are hoping to replace test users with?
To review the module in action: https://www-dev.colorado.edu/p1ff5585fe96/
Login as self; then masquerade as users 'siteowner', 'siteeditor', or 'editonly' by typing their names into the Masquerade selection field at bottom of page. Note that t\The site is configured such that you cannot masquerade as someone with an administrator role or a developer role.
(Note: the test users's password is the same as their login.)
@AlanBCole We are not using it presently. We are hoping to replace test users with it
This seems to work properly, but I think we should talk about the best way to get the masquerade block on the page, and where it should be on the page.
Talked about two implementations
@jwfuller will take a look at the dev site and the code
To note: When a user is masquerading, the Masquerade module automatically adds a 'Switch Back' link to the Navigation menu, to make it easy to switch back. Maybe we can hijack this to add the link to a different menu.
I think the menu item route will work. I think there is also a way to check and see if the user is masquerading (it may already do this for us) https://git.drupalcode.org/project/masquerade/-/blob/7.x-1.x/masquerade.module#L231
@kevincrafts I've added a 'switch back' link to the blue toolbar, which only shows when you are masquerading as someone else. Please review. 1) do you like that icon? 2) what about the words 'switch back' -- is that clear or should it say something else?
Looks good to me.
Documentation: https://www.drupal.org/node/1801588