- Notifications
You must be signed in to change notification settings - Fork1k
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
We setup our Helpdesk team with the User Admin role to allow them to remove users that leave. According to issue#7872 they shouldn't be able to delete a user with workspaces. However it appears they are able to. An owner like myself am unable to delete the user, but they can.
My guess is the check here
Line 555 ina7fac30
iflen(workspaces)>0 { |
len(workspaces) > 0
is false from their perspective and the user delete is allowed to proceed.Relevant Log Output
Expected Behavior
The user workspaces are deleted with the user, or the user delete is blocked.
Steps to Reproduce
- Create a test user and a test workspace
- Create a useradmin user with the User Admin role
- Use useradmin to delete the user
- The user is deleted but the workspace remains
Environment
- Host OS: K3S 1.32.5+k3s1
- Coder version: v2.22.1+8708d81
Additional Context
No response