feat(admin): warn message last admin
Description
- removing last admin results in the entity not having a person to contact
- display a warning in the remove manager/manager group dialogs
- also display a warning when deleting a group that potentially supplies tha last admin to a VO/Facility
- such groups are distinguished by a warning icon and a tooltip in the remove groups dialog
- disabled checkboxes and added tooltip for derived admins on the group managers page
- updated openapi
How to test
Steps are described in the task description, but shortly:
Create a new Vo/Facility, add a few direct members + authoritative groups, play around with different combinations and see that the warning displays only when it should (only in Vo/Facility, when removing the entity results in no contact person), that the correct managers are displayed (also try different entity manager pages than Vo/Facility to make sure, for example Group has the extra feature of also displaying indirect managers, make sure this still works as intended -> I also fixed the checkboxes for this use case, check this out as well), no console errors are logged, etc.
IMPORTANT: check on the Roles page (be it 'My Profile', 'Admin->Users' or 'Group') was also added. The 'Remove role' dialog was refactored as a result of this. Please make sure to thoroughly test removing/adding roles as well to ensure the refactor does not include bugs.
Author's checklist
-
I have followed the contribution guidelines -
This MR has been tested or does not change functionality -
I have added relevant merge request dependencies (if this MR has any) -
I have added the correct labels -
I have assigned reviewers (if any are relevant) -
I have edited the documentation (if the changes require it) or I have noted the need for the change if I do not have access to the documentation -
I have marked all introduced BREAKING CHANGES or necessary DEPLOYMENT NOTES in the commit message(s)
Reviewer's checklist
-
This MR has been tested or does not change functionality -
This MR has correct commit message format
Other information
N/A
Related issues
re STR-1410