-
Notifications
You must be signed in to change notification settings - Fork 10
Better control of User Deletion in User Administration page #117
Description
Implement few improvements in Access Control - People page:
- add warning message in Delete Confirmation dialog when user is submitter for existing items:
Warning: User is submitter for existing items!
-
disable or don't allow admin user to remove himself/herself
(case when logged in admin user wants to remove himself/herself) -
add warning message in Delete Confirmation dialog when user is admin (warning when removing another admin):
Warning: User is admin!
In case of (1) user is submitter for existing items and (3) user is admin - add both warnings.
To check if user is submitter, use the following API requests:
// check archived items for the user
GET /server/api/discover/search/objects?page=0&size=1&query=submitter_authority:USER_ID
// check workspace items for the user
GET /server/api/submission/workspaceitems/search/findBySubmitter?uuid=USER_ID&size=1
// check workflow items for the user
GET /server/api/workflow/workflowitems/search/findBySubmitter?uuid=USER_ID&size=1
In all requests, check the totalElements value in the response.
See also: ufal/clarin-dspace#1345