human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

Super admin session poisoning after switching roles via dropdown

Open cielf opened this issue 1 year ago • 1 comments

Summary

Fix problems when you are a superadmin and org user

Why

Improves support capability

Details

You should be able to switch back and forth between superadmin and org_admin. Part 1: The "Switch To" functionality that we have for orgs/partners needs to be available for superadmins as well.

Part 2: "My Organization" should not show up when you are operating as a superadmin, and the "Administration" drop down that appears when you are a superadmin operating as an org_admin should also be removed.

This is ranked advanced because it requires high knowledge of how users and roles work in this system.

original ask

Aside from many 500s, there's an issue that seems to break my login session when I try to act as the bank admin for the r4g test bank in prod. Steps:

  1. login (takes me to super dashboard)
  2. click 'My Organization' (only way to go to prod test org…its dashboard now has embedded 500…i think that's new. Also, at this point, i can jump back to admin via Administration dropdown at top and then repeat this step num 2 to come back here…can do that indefinitely and it works.)
  3. click Switch to: Ruby For Good Test. Takes me to a 500 text page 500 Internal Server Error If you are the administrator of this website, then please read this web application's log file and/or the web server's log file to find out what went wrong. with url https://humanessentials.app/rfgtest/dashboard.

Image

if i try to go back, i go back to the super admin view. when i click My Organization, i get the same 500 text page mentioned above. can't get back to the bank until logging out + logging back in.

Criteria for completion

  • [ ] Can switch back and forth between superadmin and orgadmin properly as described
  • [ ] There is only one way to switch back and forth between superadmin and orgadmin
  • [ ] tests to support above

cielf avatar Apr 21 '24 14:04 cielf

I'd like to work on this but I won't be able to get started right away. If someone else would like to take this issue in the meantime, feel free!

jp524 avatar May 05 '24 15:05 jp524

I'm ready to work on this :) Could you please assign me the issue @cielf?

jp524 avatar May 20 '24 19:05 jp524

It is, apparently, yours!

cielf avatar May 20 '24 20:05 cielf