I am building a system where the users have roles that can change over time. One user can have one or more roles. The roles define access to pages and features. Some of the users will have an Admin role, and each system needs to have at least one Administrator to manage the system.
The system has a "Role Management" View, where the Admin users can add or remove new roles to other users and themselves. When considering the case that an Admin user would attempt to take Admin role away from him/herself, I see a few options:
- Prevent this and show an error message telling the user that Admin role cannot be removed
- Warn the users and allow them taking the role off (problem: the user could "brick" the system and leave it without an Admin, unless they call service center and get the situation fixed by a Super Admin)
- Prevent the Admins removing Admin role from themselves and inform them that only another Admin user can remove his/her Admin role
Any experiences which one would work the best? Or perhaps some other ideas/thoughts?