Skip to content
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

As admin, I can access user management after demoting myself #3784

Closed
jvillafanez opened this issue May 12, 2022 · 4 comments
Closed

As admin, I can access user management after demoting myself #3784

jvillafanez opened this issue May 12, 2022 · 4 comments

Comments

@jvillafanez
Copy link
Member

Describe the bug

I shouldn't be able to access to the user management page (or access as regular user) and I shouldn't be able to perform actions if I become a regular user.

Steps to reproduce

Steps to reproduce the behavior:

  1. As user "admin", go to the user management page
  2. Edit user "admin" and set the role to "user"
  3. Try to perform any additional operation

Expected behavior

Operation on step 3 shouldn't be possible because he isn't an admin any longer.
Alternatively, the user "admin" shouldn't be able to change his own role.

Actual behavior

  • Operation on step 1 is successful (not sure if it should be or not)
  • user "admin" is listed as regular user
  • user "admin" can still perform operations
  • It seems other users with the admin role behave as expected.

Setup

Basic oCIS 2.0.0.beta1 with the demo users enabled. The rest of the setup is the default one.

OCIS_VERSION=vX.X.X
BRANCH=vX.X.X
STORAGE_FRONTEND_UPLOAD_DISABLE_TUS=false

Additional context

It seems this happens only with the "admin" user, so maybe the "admin" user keeps the admin role. However, if this is the case, he shouldn't be able to have a different role.

@micbar
Copy link
Contributor

micbar commented Jul 13, 2022

this should be fixed in 2.0.0-beta5

@michl19
Copy link
Contributor

michl19 commented Jul 18, 2022

Refs #4181

@micbar
Copy link
Contributor

micbar commented Jul 19, 2022

According to our improvements regarding the release flow, this is a very good example where we need to write a new test to prevent further regressions.

@dragotin @ScharfViktor JFYI

@ScharfViktor
Copy link
Contributor

Re-tested:
Actual result: admin can change his own role and after that he cannot manage users

@micbar what we expect? I thought we prohibit admit to edit own role #3713 (comment)

@butonic butonic changed the title As admin, I can access to user management after demoting myself As admin, I can access user management after demoting myself Jul 19, 2022
@ScharfViktor ScharfViktor self-assigned this Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants