Skip to content

Commit

Permalink
bug #5496 Security voters fixes (german.bortoli)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

Security voters fixes

Fixed PHP doc for how to declare the voter as a service, now they are identical to XML and YAML.

Commits
-------

390c05f Fixed PHP doc for how to declare the voter as a service, now they are identical to XML and YAML.
  • Loading branch information
xabbuh committed Jul 6, 2015
2 parents c1dac43 + 390c05f commit e661d98
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cookbook/security/voters_data_permission.rst
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ and tag it with ``security.voter``:
xsi:schemaLocation="http://symfony.com/schema/dic/services
http://symfony.com/schema/dic/services/services-1.0.xsd">
<services>
<service id="security.access.post_document_voter"
<service id="security.access.post_voter"
class="AppBundle\Security\Authorization\Voter\PostVoter"
public="false">
<tag name="security.voter" />
Expand All @@ -182,9 +182,10 @@ and tag it with ``security.voter``:
// src/AppBundle/Resources/config/services.php
$container
->register(
'security.access.post_document_voter',
'security.access.post_voter',
'AppBundle\Security\Authorization\Voter\PostVoter'
)
->setPublic(false)
->addTag('security.voter')
;
Expand Down

0 comments on commit e661d98

Please sign in to comment.