Skip to content

Commit

Permalink
Avoid passing array into user->isAbleTo (#11145)
Browse files Browse the repository at this point in the history
(cherry picked from commit 19962f8)
  • Loading branch information
tristan-orourke authored and brindasasi committed Aug 2, 2024
1 parent 600d09a commit d71e01f
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/app/Models/PoolCandidate.php
Original file line number Diff line number Diff line change
Expand Up @@ -754,11 +754,9 @@ public function scopeAuthorizedToView(Builder $query)
return $query->where('id', null);
}

$hasSomePermission = $user->isAbleTo([
'view-own-application',
'view-team-submittedApplication',
'view-any-submittedApplication',
]);
$hasSomePermission = $user->isAbleTo('view-own-application')
|| $user->isAbleTo('view-team-submittedApplication')
|| $user->isAbleTo('view-any-submittedApplication');

// User does not have any of the required permissions
if (! $hasSomePermission) {
Expand Down

0 comments on commit d71e01f

Please sign in to comment.