Skip to content

Commit

Permalink
fix permission resolver to allow multistage scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert Smusz committed Nov 26, 2019
1 parent 0193076 commit 8b3c0e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/PermissionResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ public static function getScopeRestrictions($subject, string $scope, int $level
return preg_grep("/^${scope}:/", array_column($permissions->toArray(), 'scope'));
})->toArray();

return array_map(function ($scope) {
return explode(':', $scope)[1];
return array_map(function ($val) use ($scope) {
return str_replace($scope . ':', '', $val);
}, $scopes);
}
}

0 comments on commit 8b3c0e3

Please sign in to comment.