Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8cf1924

Browse files
committed
[symfony#2532] Adding even more information to the note about VoterInterface methods
1 parent2e0ed92 commit8cf1924

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎cookbook/security/voters.rst‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,10 @@ the security layer. This can be done easily through the service container.
106106
:method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::supportsAttribute`
107107
and:method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::supportsClass`
108108
are not being called internally by the framework. Once you have registered your
109-
voter the ``vote()`` method will always be called, not depending on your
110-
restrictions. Therefore you need to call those methods in your implementation
111-
of the ``vote()`` method.
109+
voter the ``vote()`` method will always be called, regardless of whether
110+
or not these two methods return true. Therefore you need to call those
111+
methods in your implementation of the ``vote()`` method and return ``ACCESS_ABSTAIN``
112+
if your voter does not support the class or attribute.
112113

113114
Declaring the Voter as a Service
114115
--------------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp