Skip to content

Commit

Permalink
minor #4755 fix minor typo (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.3 branch.

Discussion
----------

fix minor typo

Commits
-------

5dca2e1 fix minor typo
  • Loading branch information
wouterj committed Jan 8, 2015
2 parents 463c30b + 5dca2e1 commit 4e880c1
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions book/security.rst
Expand Up @@ -204,7 +204,7 @@ user to be logged in to access this URL:
# ...
firewalls:
# ...
access_control:
# require ROLE_ADMIN for /admin*
- { path: ^/admin, roles: ROLE_ADMIN }
Expand Down Expand Up @@ -427,9 +427,10 @@ If you'd like to load your users via the Doctrine ORM, that's easy! See
:doc:`/cookbook/security/entity_provider` for all the details.

.. _book-security-encoding-user-password:
.. _c-encoding-the-users-password:

C) Encoding the Users Password
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C) Encoding the User's Password
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Whether your users are stored in ``security.yml``, in a database or somewhere
else, you'll want to encode their passwords. The best algorithm to use is
Expand Down Expand Up @@ -668,7 +669,7 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
# ...
firewalls:
# ...
access_control:
# require ROLE_ADMIN for /admin*
- { path: ^/admin, roles: ROLE_ADMIN }
Expand Down Expand Up @@ -834,9 +835,9 @@ in this chapter).
Be careful with this in your layout or on your error pages! Because of
some internal Symfony details, to avoid broken error pages in the ``prod``
environment, wrap calls in these templates with a check for ``app.user``:

.. code-block:: html+jinja

{% if app.user and is_granted('ROLE_ADMIN') %}

Securing other Services
Expand Down Expand Up @@ -970,7 +971,7 @@ the User object, and use the ``isGranted`` method (or

// boo :(. Never check for the User object to see if they're logged in
if ($this->getUser()) {

}

Retrieving the User in a Template
Expand All @@ -989,7 +990,7 @@ key:

.. code-block:: html+php

<?php if ($view['security']->isGranted('IS_AUTHENTICATED_FULLY')): ?>
<?php if ($view['security']->isGranted('IS_AUTHENTICATED_FULLY')): ?>
<p>Username: <?php echo $app->getUser()->getUsername() ?></p>
<?php endif; ?>

Expand Down

0 comments on commit 4e880c1

Please sign in to comment.