We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fda649 commit 5b9458dCopy full SHA for 5b9458d
1 file changed
src/Auth/UsesRoles.php
@@ -65,7 +65,7 @@ public function assign($role): bool
65
public function can($permission): bool
66
{
67
if (is_array($permission)) {
68
- return count(array_intersect($permission, $this->permissions)) === count($permission);
+ return count(array_intersect($permission, $this->permissions)) > 0;
69
}
70
71
return in_array($permission, $this->permissions);
@@ -87,7 +87,7 @@ public function cannot($permission): bool
87
public function is($role): bool
88
89
if (is_array($role)) {
90
- return count(array_intersect($role, $this->roles)) === count($role);
+ return count(array_intersect($role, $this->roles)) > 0;
91
92
93
return in_array($role, haystack: $this->roles);
0 commit comments