feat: add ability to remove team members
## Changes - Add DELETE /api/v1/auth/users/:userId endpoint (admin + superadmin) - Add deleteUserById service method with role hierarchy enforcement - Superadmins can remove admins and regular users - Admins can only remove regular users - No one can remove superadmins, demo users, or themselves via this endpoint - Add "Remove user" button with confirmation dialog on edit user page - Allow admins to view user details and access the edit user page - Add i18n strings for remove user button and confirmation dialog ## Access control - superadmin -> can remove admin, user - admin -> can remove user only - admin cannot remove superadmin or other admins (enforced on both backend and frontend)
This commit is contained in:
1 parent
188445c57a
commit
82998a7795
6 files changed
+136
-17
No files matched your search
@@ -619,6 +619,15 @@
|
||||
"title": "Roles",
|
||||
"description": "Assign roles to the user. Multiple roles can be selected."
|
||||
}
|
||||
},
|
||||
"buttons": {
|
||||
"removeUser": "Remove user"
|
||||
},
|
||||
"dialog": {
|
||||
"removeUser": {
|
||||
"title": "Remove user",
|
||||
"content": "Are you sure you want to remove {{name}} from your team? This action cannot be undone."
|
||||
}
|
||||
}
|
||||
},
|
||||
"incidents": {
|
||||
|
||||
Reference in new issue
Block a user