Skip to content

Commit

Permalink
fix: Regression on hasRole (#4)
Browse files Browse the repository at this point in the history
`hasRole` tidak akan berjalan semestinya ketika developer menggunakan fitur `checkAll`.
  • Loading branch information
nmfzone authored and uyab committed Jul 22, 2019
1 parent ae75a9d commit 832c48e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/HasRoleAndPermission.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function hasRole($role, $checkAll = false)
if (is_array($role)) {
$match = 0;
foreach ($role as $r) {
$match += (int)$this->hasRole($r);
$match += (int)$this->hasRole($r, $checkAll);
}

if ($checkAll) {
Expand Down

0 comments on commit 832c48e

Please sign in to comment.