8000 Voter update by weaverryan · Pull Request #5908 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

Voter update #5908

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 30, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tweaks thanks to Javier
  • Loading branch information
weaverryan committed Nov 27, 2015
commit 5d0e6b279b837881b12a5e138b66d170db6d9d43
4 changes: 2 additions & 2 deletions cookbook/security/voters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ which makes creating a voter even easier.
}

.. versionadded::
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version number is missing here

The ``Voter`` helper class was added in Symfony 2.8. In early versions, an
The ``Voter`` helper class was added in Symfony 2.8. In earlier versions, an
``AbstractVoter`` class with similar behavior was available.

.. _how-to-use-the-voter-in-a-controller:
Expand Down Expand Up @@ -146,7 +146,7 @@ would look like this::
$user = $token->getUser();

if (!$user instanceof User) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. < 6370 a class="Link--inTextBlock" href="https://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment" aria-label="Learn more about hiding disruptive comments">Learn more.

We need to check if $user is an object.

// the user must not be logged in, so we deny access
// the user must be logged in; if not, deny access
return false;
}

Expand Down
0