Skip to content

Commit

Permalink
Added back the changes relevant to Symfony 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
javiereguiluz committed Feb 3, 2015
1 parent 95aeb4c commit 6e273b8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cookbook/security/remember_me.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ might ultimately looks like this:
<!-- src/Acme/SecurityBundle/Resources/views/Security/login.html.php -->
<?php if ($error): ?>
<div><?php echo $error->getMessage() ?></div>
<?php endif; ?>
<?php endif ?>

<form action="<?php echo $view['router']->generate('login_check') ?>" method="post">
<label for="username">Username:</label>
Expand Down Expand Up @@ -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();
Expand All @@ -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:

Expand Down

0 comments on commit 6e273b8

Please sign in to comment.