diff --git a/src/PermissionResolver.php b/src/PermissionResolver.php index 59ace96..61aaa3f 100644 --- a/src/PermissionResolver.php +++ b/src/PermissionResolver.php @@ -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); } }