-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Give SuperAdmin DefaultRole on PUT /me #2632
Conversation
Previously, SuperAdmins were given the admin role in an organization when they switched into it (via a PUT to /me). This is undesireable for the comonitoring organization. This PR gives SuperAdmins the default role for the organization when they switch into it.
|
Show that notification for 4 seconds. Change copy from 'signed in' to 'logged in'. Remove concept of userHasRoleInOrg since now obsolete.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested the server & works as expected. Code is good. Nice work.
Added some client code which should be reviewed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to reset my DB due to ISE issue. Will open a new issue for that. Then discovered the code on this branch didn't work in the cases I tried. @desa is coming up with a fix.
170c649
to
6bf2d25
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was able to get everything working, the way I was testing earlier wasn't taking into account the expected flow, being, that the first user of a new organization will always be admin, but subsequent users will be that of the default user. approv'd
Previously, SuperAdmins were given the admin role in an organization
when they switched into it (via a PUT to /me). This is undesireable for
the comonitoring organization. This PR gives SuperAdmins the default
role for the organization when they switch into it.
Additionally, this makes it so that when any user switches organizations, they see a longer-displayed notification that clarifies which organization and what role they have switched into, using the terminology
logged in
. And this will happen regardless of whether they were a SuperAdmin or not, and whether (if SuperAdmin) that SuperAdmin had a role in the org before or not.Connect #2641
Connect #2636