Permalink
Browse files

feature #4957 Added a mention to the @Security annotation (javieregui…

…luz)

This PR was submitted for the master branch but it was merged into the 2.6 branch instead (closes #4957).

Discussion
----------

Added a mention to the @Security annotation

| Q             | A
| ------------- | ---
| Doc fix?      | no
| New docs?     | yes
| Applies to    | 2.6+
| Fixed tickets | -

Commits
-------

ac88a71 Removed an unneeded reference to Symfony 2.4 version
420b338 Added a mention to the @Security annotation
  • Loading branch information...
weaverryan committed Feb 24, 2015
2 parents 14a080f + ac88a71 commit c6bea3797288aa4ecb0f21b235d852bbde18d6b9
Showing with 4 additions and 6 deletions.
  1. +4 −6 cookbook/security/remember_me.rst
@@ -175,15 +175,15 @@ In the following example, the action is only allowed if the user has the
The ``security.authorization_checker`` service was introduced in Symfony 2.6. Prior
to Symfony 2.6, you had to use the ``isGranted()`` method of the ``security.context`` service.
You can also choose to install and use the optional JMSSecurityExtraBundle_,
which can secure your controller using annotations:
If your application is based on the Symfony Standard Edition, you can also secure
your controller using annotations:
.. code-block:: php
use JMS\SecurityExtraBundle\Annotation\Secure;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
/**
* @Secure(roles="IS_AUTHENTICATED_FULLY")
* @Security("has_role('IS_AUTHENTICATED_FULLY')")
*/
public function editAction($name)
{
@@ -212,5 +212,3 @@ which can secure your controller using annotations:
For more information on securing services or methods in this way,
see :doc:`/cookbook/security/securing_services`.
.. _JMSSecurityExtraBundle: https://github.com/schmittjoh/JMSSecurityExtraBundle

0 comments on commit c6bea37

Please sign in to comment.