mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-07-28 17:02:04 +03:00
Extracted some methods into a BookRepo
This commit is contained in:
@ -137,7 +137,7 @@ class PermissionsRepo
|
||||
// Prevent deleting admin role or default registration role.
|
||||
if ($role->system_name && in_array($role->system_name, $this->systemRoles)) {
|
||||
throw new PermissionsException(trans('errors.role_system_cannot_be_deleted'));
|
||||
} else if ($role->id == setting('registration-role')) {
|
||||
} else if ($role->id === intval(setting('registration-role'))) {
|
||||
throw new PermissionsException(trans('errors.role_registration_default_cannot_delete'));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user