Skip to content

Bug: Users: Admin is able to remove admin role from themselves via just click and get locked as well as simply remove all admins #1847

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

Closed
nadzeyav opened this issue May 27, 2022 · 4 comments
Assignees
Labels
api Area: HTTP API
Milestone

Comments

@nadzeyav
Copy link

OS Information

Steps to Reproduce

  1. Login as Admin user
  2. Go to users
  3. Expand Admin user roles dropdown and uncheck Member role and then Admin role

Expected

At least any notification about Are you sure, but maybe better will be not allow to unassign admins roles from themselves.

Actual

Admin user has no roles assigne at all, cannot fix this issue in current session and after is logged off even no error message is displayed at login

Logs

Screenshot

Admin.mp4

Notes

@nadzeyav nadzeyav changed the title Bug: Users: Admin is able to remove admin role from himself via just click and get locked as well as remove all admins Bug: Users: Admin is able to remove admin role from himself via just click and get locked as well as simply remove all admins May 27, 2022
@greyscaled greyscaled changed the title Bug: Users: Admin is able to remove admin role from himself via just click and get locked as well as simply remove all admins Bug: Users: Admin is able to remove admin role from themselves via just click and get locked as well as simply remove all admins May 27, 2022
@tjcran tjcran added this to the Community MVP milestone May 30, 2022
@misskniss misskniss added site Area: frontend dashboard api Area: HTTP API labels May 31, 2022
@misskniss misskniss removed the site Area: frontend dashboard label May 31, 2022
@misskniss
Copy link

Check that the toast for the error pops up correctly on the FE when this is fixed @Emyrk .

@f0ssel
Copy link
Contributor

f0ssel commented May 31, 2022

I think blocking self-role changing entirely is a good first step and if a case comes up where we need to support something we didn't think about we can add it later.

@Emyrk
Copy link
Member

Emyrk commented May 31, 2022

#1931

@nadzeyav
Copy link
Author

nadzeyav commented Jun 1, 2022

Verified in Coder v0.0.0-devel+7acb742

Admin cannot change his own roles, error message is returned as described in #1931

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Area: HTTP API
Projects
None yet
Development

No branches or pull requests

6 participants