Skip to content
This repository was archived by the owner on Aug 20, 2023. It is now read-only.

Commit a8989fe

Browse files
optimized hasRolePermission() method
1 parent f9367f9 commit a8989fe

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

Traits/PermissionTrait.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ public function hasPermission($permission): bool
2727
public function hasRolePermission($permission): bool
2828
{
2929
if(!isset($this->roles))
30-
return false;
31-
32-
if((bool)$this->roles()->count())
3330
foreach($this->roles as $role)
3431
return $role->hasPermission($permission);
3532

0 commit comments

Comments
 (0)