Skip to content

Commit e661d98

Browse files
committed
bug #5496 Security voters fixes (german.bortoli)
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.
2 parents c1dac43 + 390c05f commit e661d98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cookbook/security/voters_data_permission.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ and tag it with ``security.voter``:
169169
xsi:schemaLocation="http://symfony.com/schema/dic/services
170170
http://symfony.com/schema/dic/services/services-1.0.xsd">
171171
<services>
172-
<service id="security.access.post_document_voter"
172+
<service id="security.access.post_voter"
173173
class="AppBundle\Security\Authorization\Voter\PostVoter"
174174
public="false">
175175
<tag name="security.voter" />
@@ -182,9 +182,10 @@ and tag it with ``security.voter``:
182182
// src/AppBundle/Resources/config/services.php
183183
$container
184184
->register(
185-
'security.access.post_document_voter',
185+
'security.access.post_voter',
186186
'AppBundle\Security\Authorization\Voter\PostVoter'
187187
)
188+
->setPublic(false)
188189
->addTag('security.voter')
189190
;
190191

0 commit comments

Comments
 (0)