Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iamgergo committed Apr 26, 2024
1 parent 341bd0e commit 27710b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Fields/Relation.php
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ public function resolveAbility(string $ability, Request $request, Model $model,

return is_null($policy)
|| ! method_exists($policy, $ability)
|| call_user_func_array([$policy, $ability], [$request->user(), $model, ...$arguments]);
|| Gate::allows($ability, [$model, ...$arguments]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function resolveAbility(string $ability, Request $request, Model $model,

return is_null($policy)
|| ! method_exists($policy, $ability)
|| call_user_func_array([$policy, $ability], [$request->user(), $model, ...$arguments]);
|| Gate::allows($ability, [$model, ...$arguments]);
}

/**
Expand Down

0 comments on commit 27710b0

Please sign in to comment.