You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
While the role admin can not be restricted it is possible to remove the user Admin from this role.
Steps To Reproduce
Steps to reproduce the behavior:
Go to Settings > Users > Admin
Remove role Admin > add role Public > Save
"You have no permission to view this site."
Expected behavior
Error Message "You can't remove the role Admin for this user." or "At least one user must inherit the role Admin." or a gray box before role Admin.
Similar to the way the permissions of the role Admin cannot be altered it shouldn't be allowed to remove the role Admin from the user admin. It should only be possible to add other roles.
For better understanding the permanent permissions set for the role Admin should be grayed out too.
Screenshots
Your Configuration (please complete the following information):
Exact BookStack Version (Found in settings): BookStack v0.24.2
@ssddanbrown How are you planning to implement this?
It is of course usefull to remove the Admin role from users and there might even be valid use cases where it is intended to remove the role from the currently authenticated user (especially together with ldap group sync). There still is php artisan bookstack:create-admin to fix this
@lommes I was thinking about just adding a check to see if the user is the only remaining admin user, then throw an error if so. So the current user can still remove the role from themselves if there's another admin in the system.
Describe the bug
While the role admin can not be restricted it is possible to remove the user Admin from this role.
Steps To Reproduce
Steps to reproduce the behavior:
Expected behavior
Error Message "You can't remove the role Admin for this user." or "At least one user must inherit the role Admin." or a gray box before role Admin.
Similar to the way the permissions of the role Admin cannot be altered it shouldn't be allowed to remove the role Admin from the user admin. It should only be possible to add other roles.
For better understanding the permanent permissions set for the role Admin should be grayed out too.
Screenshots
Your Configuration (please complete the following information):
Related but not sames issues:
#834
#977
The text was updated successfully, but these errors were encountered: