Skip to content

Commit 17ee9e8

Browse files
committed
Added back the changes relevant to Symfony 2.6
1 parent 2cbb1b8 commit 17ee9e8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

cookbook/security/remember_me.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ might ultimately looks like this:
9090
<!-- src/Acme/SecurityBundle/Resources/views/Security/login.html.php -->
9191
<?php if ($error): ?>
9292
<div><?php echo $error->getMessage() ?></div>
93-
<?php endif; ?>
93+
<?php endif ?>
9494

9595
<form action="<?php echo $view['router']->generate('login_check') ?>" method="post">
9696
<label for="username">Username:</label>
@@ -162,7 +162,7 @@ In the following example, the action is only allowed if the user has the
162162
163163
public function editAction()
164164
{
165-
if (false === $this->get('security.context')->isGranted(
165+
if (false === $this->get('security.authorization_checker')->isGranted(
166166
'IS_AUTHENTICATED_FULLY'
167167
)) {
168168
throw new AccessDeniedException();
@@ -171,6 +171,10 @@ In the following example, the action is only allowed if the user has the
171171
// ...
172172
}
173173
174+
.. versionadded:: 2.6
175+
The ``security.authorization_checker`` service was introduced in Symfony 2.6. Prior
176+
to Symfony 2.6, you had to use the ``isGranted()`` method of the ``security.context`` service.
177+
174178
If your application is based on the Symfony Standard Edition, you can also secure
175179
your controller using annotations:
176180

0 commit comments

Comments
 (0)