]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Permissions/PermissionsRepo.php
Move logFailedAccess into Activity
[bookstack] / app / Auth / Permissions / PermissionsRepo.php
index e7840ff76213369d161a41f59dfacf42e8019bf1..56ef193015f7103a98bb440ec60498e5bf765c25 100644 (file)
@@ -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'));
         }