@@ -61,7 +61,7 @@ remember me functionality, as it will not always be appropriate. The usual
61
61
way of doing this is to add a checkbox to the login form. By giving the checkbox
62
62
the name ``_remember_me ``, the cookie will automatically be set when the checkbox
63
63
is checked and the user successfully logs in. So, your specific login form
64
- might ultimately look like this:
64
+ might ultimately looks like this:
65
65
66
66
.. configuration-block ::
67
67
@@ -175,21 +175,25 @@ In the following example, the action is only allowed if the user has the
175
175
The ``security.authorization_checker `` service was introduced in Symfony 2.6. Prior
176
176
to Symfony 2.6, you had to use the ``isGranted() `` method of the ``security.context `` service.
177
177
178
- You can also choose to install and use the optional JMSSecurityExtraBundle _,
179
- which can secure your controller using annotations:
178
+ If your application is based on the Symfony Standard Edition, you can also secure
179
+ your controller using annotations:
180
180
181
181
.. code-block :: php
182
182
183
- use JMS\SecurityExtraBundle\Annotation\Secure ;
183
+ use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security ;
184
184
185
185
/**
186
- * @Secure(roles=" IS_AUTHENTICATED_FULLY")
186
+ * @Security("has_role(' IS_AUTHENTICATED_FULLY') ")
187
187
*/
188
188
public function editAction($name)
189
189
{
190
190
// ...
191
191
}
192
192
193
+ .. versionadded :: 2.4
194
+ The ``@Security `` annotation was introduced in SensioFrameworkExtraBundle 3.0,
195
+ which can only be used with Symfony 2.4 or later.
196
+
193
197
.. tip ::
194
198
195
199
If you also had an access control in your security configuration that
@@ -212,5 +216,3 @@ which can secure your controller using annotations:
212
216
213
217
For more information on securing services or methods in this way,
214
218
see :doc: `/cookbook/security/securing_services `.
215
-
216
- .. _JMSSecurityExtraBundle : https://github.com/schmittjoh/JMSSecurityExtraBundle
0 commit comments