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

Improve User Management - Add the ability to remove roles that have been directly added to users #445

Closed
3 tasks done
crisr15 opened this issue Apr 24, 2023 · 2 comments
Closed
3 tasks done

Comments

@crisr15
Copy link
Contributor

crisr15 commented Apr 24, 2023

Story

Currently when a role has been directly added to a user it can not be removed. There is no option to edit permissions from the manage users page. Add the ability for users with the manage user role to remove roles from users who have either manage user roles or below. Add the ability for users with the admin role to remove roles from any user. This only applies to roles directly added to users, and you should not be able to remove roles added to a user by a group.

Acceptance Criteria

  • After a role has been added directly to a user (user A), a user (user B) with permissions 'user manager' can remove the roles directly added to user A if user A is not an admin
  • After a role has been added directly to a user (user A), a user (user B) with permissions 'admin' can remove the roles directly added to user A.
  • Roles added by groups can not be removed without removing the user from the group. (dev note: is this saying that if a user is part of a group, you can't remove group roles it has?)

Screenshots / Video

Current functionality does not have any way to remove a role from a user.
Screenshot 2023-04-24 at 12 42 46 PM

Testing Instructions

  • As a user who has a 'user manager' role, add a role directly to a user (User A) who is not an admin.
  • As a user who has a 'user manager' an 'admin' role, add an admin role directly to a user (User C).
  • As a user with role 'user manager' remove that role from the user A.
  • As a user with role 'user manager' try to remove admin role from user C. You should not be able to.
  • As a user with role 'admin' remove admin role from user C.
  • As a user with role 'admin' try to remove a role that was inherited from a group. You should not be able to.

Notes

@crisr15 crisr15 added the 79583-20230322 - Workflow Sprint Workflow Improvement Sprint label Apr 24, 2023
@sephirothkod sephirothkod self-assigned this May 11, 2023
@crisr15
Copy link
Contributor Author

crisr15 commented Jun 9, 2023

Did not have room in the budget to complete during the Workflow Sprint. This item has been moved back to no status to be reprioritized.

@jillpe jillpe added October Sprint and removed 79583-20230322 - Workflow Sprint Workflow Improvement Sprint labels Oct 6, 2023
@kirkkwang kirkkwang self-assigned this Dec 5, 2023
kirkkwang added a commit that referenced this issue Dec 5, 2023
This commit will add the ability for user_managers to remove site roles
from users other than admin.  Admins will be able to remove any site
role from any user.

Ref:
  - #445
kirkkwang added a commit that referenced this issue Dec 5, 2023
This commit will add the ability for user_managers to remove site roles
from users other than admin.  Admins will be able to remove any site
role from any user.

Ref:
  - #445
kirkkwang added a commit that referenced this issue Dec 6, 2023
This commit will add the ability for user_managers to remove site roles
from users other than admin.  Admins will be able to remove any site
role from any user.

Ref:
  - #445
kirkkwang added a commit that referenced this issue Dec 6, 2023
This commit will add the ability for user_managers to remove site roles
from users other than admin.  Admins will be able to remove any site
role from any user.

Ref:
  - #445
kirkkwang added a commit that referenced this issue Dec 6, 2023
This commit will add the ability for user_managers to remove site roles
from users other than admin.  Admins will be able to remove any site
role from any user.

Ref:
  - #445
kirkkwang added a commit that referenced this issue Dec 7, 2023
This commit will add the ability for user_managers to remove site roles
from users other than admin.  Admins will be able to remove any site
role from any user.

Ref:
  - #445
@laritakr
Copy link
Contributor

laritakr commented Dec 8, 2023

QA results

  • As a user who has a 'user manager' role, add a role directly to a user (User A) who is not an admin. Passed
As larita@scientist.com, added work editor role to laritakr@gmail.com Screenshot 2023-12-08 at 5 48 53 PM

Screenshot 2023-12-08 at 5 54 06 PM

  • As a user who has a 'user manager' an 'admin' role, add an admin role directly to a user (User C). Passed
As support@notch8.com, added admin to laritakr@gmail.com

Screenshot 2023-12-08 at 6 06 24 PM

  • As a user with role 'user manager' remove that role from the user A. Passed
As larita@scientist.com, removed user manager role from kirk@example.com

Screenshot 2023-12-08 at 6 11 32 PM

  • As a user with role 'user manager' try to remove admin role from user C. You should not be able to. Passed
As larita@scientist.com, cannot remove admin role from laritakr@gmail.com

Screenshot 2023-12-08 at 6 12 12 PM

  • As a user with role 'admin' remove admin role from user C. Passed
As laritakr@gmail.com, added, then removed admin role from kirk@example.com

Screenshot 2023-12-08 at 6 17 50 PM

Screenshot 2023-12-08 at 6 18 35 PM

  • As a user with role 'admin' try to remove a role that was inherited from a group. You should not be able to. Passed
As laritakr@gmail.com, was unable to remove Admin group from larita@scientist.com (button is inactive)

Screenshot 2023-12-08 at 6 20 21 PM

Screenshot 2023-12-08 at 6 21 00 PM

@jeremyf jeremyf closed this as completed Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

6 participants