10000 [Security] add & update doc entries on AbstractVoter implementation by javiereguiluz · Pull Request #5423 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Security] add & update doc entries on AbstractVoter implementation #5423

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

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations 8000
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
Fixed some typos
  • Loading branch information
javiereguiluz committed Jun 23, 2015
commit e680e7768e92abc89daf10280119264ea14f2bf6
5 changes: 2 additions & 3 deletions cookbook/security/voters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ the security layer. This can be done easily through the service container.
methods in your implementation of the ``vote()`` method and return ``ACCESS_ABSTAIN``
if your voter does not support the class or attribute.


.. tip::

An
Expand Down Expand Up @@ -204,8 +203,8 @@ application configuration file with the following code.
That's it! Now, when deciding whether or not a user should have access,
the new voter will deny access to any user in the list of blacklisted IPs.

Note that the voters are only called, if any access is actually checked. So
you need at least something like
Note that the voters are only called, if any access is actually checked. So
you need at least something like

.. configuration-block::

Expand Down
4 changes: 2 additions & 2 deletions cookbook/security/voters_data_permission.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ To recap, here's what's expected from the three abstract methods:

:method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AbstractVoter::getSupportedClasses`
It tells Symfony that your voter should be called whenever an object of one
of the given classes is passed to ``isGranted()`` For example, if you return
of the given classes is passed to ``isGranted()``. For example, if you return
``array('AppBundle\Model\Product')``, Symfony will call your voter when a
``Product`` object is passed to ``isGranted()``.

:method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\AbstractVoter::getSupportedAttributes`
It tells Symfony that your voter should be called whenever one of these
strings is passes as the first argument to ``isGranted()``. For example, if
strings is passed as the first argument to ``isGranted()``. For example, if
you return ``array('CREATE', 'READ')``, then Symfony will call your voter
when one of these is passed to ``isGranted()``.

Expand Down
0