From 6e273b899812825c8829b400bfda965f0e809f3b Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Mon, 2 Feb 2015 17:41:56 +0100 Subject: [PATCH] Added back the changes relevant to Symfony 2.6 --- cookbook/security/remember_me.rst | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cookbook/security/remember_me.rst b/cookbook/security/remember_me.rst index 5bd2fd15014..0727d91df97 100644 --- a/cookbook/security/remember_me.rst +++ b/cookbook/security/remember_me.rst @@ -90,7 +90,7 @@ might ultimately looks like this:
getMessage() ?>
- +
@@ -162,7 +162,7 @@ In the following example, the action is only allowed if the user has the public function editAction() { - if (false === $this->get('security.context')->isGranted( + if (false === $this->get('security.authorization_checker')->isGranted( 'IS_AUTHENTICATED_FULLY' )) { throw new AccessDeniedException(); @@ -171,6 +171,10 @@ In the following example, the action is only allowed if the user has the // ... } +.. versionadded:: 2.6 + 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. + If your application is based on the Symfony Standard Edition, you can also secure your controller using annotations: