Skip to content

Commit

Permalink
Merge pull request #62 from anzusystems/feature_business_logic_vote
Browse files Browse the repository at this point in the history
Update businessLogicVote method to include attribute parameter
  • Loading branch information
TomasHermanek authored Aug 14, 2024
2 parents 26cd9dc + 6dfba96 commit c194007
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Security/Voter/AbstractVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ protected function voteOnAttribute(string $attribute, mixed $subject, TokenInter
}

// If specific business logic allows, grant access
if ($this->businessLogicVote($subject, $user)) {
if ($this->businessLogicVote($attribute, $subject, $user)) {
return true;
}

return $this->permissionVote($attribute, $subject, $user);
}

protected function businessLogicVote(mixed $subject, AnzuUser $user): bool
protected function businessLogicVote(string $attribute, mixed $subject, AnzuUser $user): bool
{
return false;
}
Expand Down

0 comments on commit c194007

Please sign in to comment.