Updated test for perms. changes and fixed static issues

This commit is contained in:
Dan Brown
2022-10-12 12:12:36 +01:00
parent 7792da99ce
commit bd412ddbf9
8 changed files with 51 additions and 37 deletions

View File

@ -83,7 +83,7 @@ class PermissionApplicator
->pluck($action, 'role_id');
// Continue up the chain if no applicable entity permission overrides.
if (empty($allowedByRoleId)) {
if ($allowedByRoleId->isEmpty()) {
continue;
}

View File

@ -47,7 +47,7 @@ class PermissionFormData
*/
public function everyoneElseEntityPermission(): EntityPermission
{
/** @var EntityPermission $permission */
/** @var ?EntityPermission $permission */
$permission = $this->entity->permissions()
->where('role_id', '=', 0)
->first();