Skip to content

Commit 308a8d9

Browse files
committed
Merge branch '1.3' into 2.1
2 parents cdf5cc8 + 0aed5c1 commit 308a8d9

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Service/Permission/UserPermissionService.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@ public function hasPermission(User $user, string $permission): bool
3232
if ($user->isAdmin()) {
3333
return true;
3434
}
35-
$permissions = $user->getPermissions();
36-
if (in_array($permission, $permissions)) {
37-
return true;
38-
}
3935

40-
return false;
36+
return $user->isAllowed($permission);
4137
}
4238
}

0 commit comments

Comments
 (0)