diff --git a/cookbook/security/voters.rst b/cookbook/security/voters.rst index 9960a032183..c6d18724de2 100644 --- a/cookbook/security/voters.rst +++ b/cookbook/security/voters.rst @@ -100,6 +100,16 @@ and compare the IP address against a set of blacklisted IP addresses: That's it! The voter is done. The next step is to inject the voter into the security layer. This can be done easily through the service container. +.. tip:: + + Your implementation of the methods + :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::supportsAttribute` + and :method:`Symfony\\Component\\Security\\Core\\Authorization\\Voter\\VoterInterface::supportsClass` + are not being called internally by the framework. Once you have registered your + voter the ``vote()`` method will always be called, not depending on your + restrictions. Therefore you need to call those methods in your implementation + of the ``vote()`` method. + Declaring the Voter as a Service --------------------------------