Skip to content

Commit

Permalink
minor #1512 Update PostVoter.php (parijke)
Browse files Browse the repository at this point in the history
This PR was merged into the main branch.

Discussion
----------

Update PostVoter.php

Update comment with correct user status

Commits
-------

b2eaa49 Update PostVoter.php
  • Loading branch information
javiereguiluz committed Apr 15, 2024
2 parents e8dc87b + b2eaa49 commit 26741c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Security/PostVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ protected function voteOnAttribute(string $attribute, $post, TokenInterface $tok
return false;
}

// the logic of this voter is pretty simple: if the logged user is the
// the logic of this voter is pretty simple: if the logged-in user is the
// author of the given blog post, grant permission; otherwise, deny it.
// (the supports() method guarantees that $post is a Post object)
return $user === $post->getAuthor();
Expand Down

0 comments on commit 26741c8

Please sign in to comment.