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.
2 parents 60f1ae3 + c0268d9 commit 304795aCopy full SHA for 304795a
src/Authorization/Traits/Authorizable.php
@@ -250,6 +250,9 @@ public function can(string ...$permissions): bool
250
// Check the groups the user belongs to
251
$this->populateGroups();
252
253
+ // Get the group matrix
254
+ $matrix = setting('AuthGroups.matrix');
255
+
256
foreach ($permissions as $permission) {
257
// Permission must contain a scope and action
258
if (strpos($permission, '.') === false) {
@@ -270,8 +273,6 @@ public function can(string ...$permissions): bool
270
273
return false;
271
274
}
272
275
- $matrix = setting('AuthGroups.matrix');
-
276
foreach ($this->groupCache as $group) {
277
// Check exact match
278
if (isset($matrix[$group]) && in_array($permission, $matrix[$group], true)) {
0 commit comments