CuBoulder / express_mono

Monolithic Express Profile - contains all bundles
GNU General Public License v2.0
1 stars 2 forks source link

Look at masquerade as a replacement to test accounts #454

Closed jwfuller closed 4 years ago

cathysnider commented 4 years ago

Documentation: https://www.drupal.org/node/1801588

cathysnider commented 4 years ago

Masquerade in Web Express

Basically, you masquerade as some else by

  1. going to admin/people,
  2. click 'edit' on person you want to masquerade as
  3. click 'view' tab so that you are on URL user/#
  4. click 'masquerade as username'

Permissions (admin/people/permissions)

edit-masquerade-as-user :

edit-masquerade-as-any-user :

edit-administer-masquerade :

edit-masquerade-as-admin : grants access to user/1.

Suggested Permission Levels for WebExp:

for WebExp Administrators

for WebExp Developers

Configuring Masquerade Administrators (admin/config/people/masquerade)

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.

Switching back

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.

Who uses the test users?

AlanBCole commented 4 years ago

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?

cathysnider commented 4 years ago

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

jwfuller commented 4 years ago

@AlanBCole We are not using it presently. We are hoping to replace test users with it

kevincrafts commented 4 years ago

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.

jwfuller commented 4 years ago

Talked about two implementations

  1. Block via locked context
  2. Menu based

@jwfuller will take a look at the dev site and the code

cathysnider commented 4 years ago

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.

https://www-dev.colorado.edu/p1ff5585fe96/

masqueNav

jwfuller commented 4 years ago

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

cathysnider commented 4 years ago

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

https://www-dev.colorado.edu/masquerade/

kevincrafts commented 4 years ago

Looks good to me.

ekellagher commented 4 years ago

Documentation: https://docs.google.com/document/d/1fPWPZIQDPPsS1HqxlXMF2JNN02muaKCoFTjYiutpwZk/edit?usp=sharing