@@ -841,15 +841,6 @@ You can easily deny access from inside a controller::
841
841
// ...
842
842
}
843
843
844
- .. versionadded :: 2.6
845
- The ``denyAccessUnlessGranted() `` method was introduced in Symfony 2.6. Previously (and
846
- still now), you could check access directly and throw the ``AccessDeniedException `` as shown
847
- in the example above).
848
-
849
- .. versionadded :: 2.6
850
- The ``security.authorization_checker `` service was introduced in Symfony 2.6. Prior
851
- to Symfony 2.6, you had to use the ``isGranted() `` method of the ``security.context `` service.
852
-
853
844
In both cases, a special
854
845
:class: `Symfony\\ Component\\ Security\\ Core\\ Exception\\ AccessDeniedException `
855
846
is thrown, which ultimately triggers a 403 HTTP response inside Symfony.
@@ -1016,10 +1007,6 @@ shown above.
1016
1007
Retrieving the User Object
1017
1008
--------------------------
1018
1009
1019
- .. versionadded :: 2.6
1020
- The ``security.token_storage `` service was introduced in Symfony 2.6. Prior
1021
- to Symfony 2.6, you had to use the ``getToken() `` method of the ``security.context `` service.
1022
-
1023
1010
After authentication, the ``User `` object of the current user can be accessed
1024
1011
via the ``security.token_storage `` service. From inside a controller, this will
1025
1012
look like::
@@ -1220,9 +1207,6 @@ in the following way from a controller::
1220
1207
1221
1208
$user->setPassword($encoded);
1222
1209
1223
- .. versionadded :: 2.6
1224
- The ``security.password_encoder `` service was introduced in Symfony 2.6.
1225
-
1226
1210
In order for this to work, just make sure that you have the encoder for your
1227
1211
user class (e.g. ``AppBundle\Entity\User ``) configured under the ``encoders ``
1228
1212
key in ``app/config/security.yml ``.
0 commit comments