8000 [Book][Security] add back old anchors · symfony/symfony-docs@e2825b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit e2825b6

Browse files
committed
[Book][Security] add back old anchors
1 parent 1972757 commit e2825b6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

book/security.rst

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ user to be logged in to access this URL:
204204
# ...
205205
firewalls:
206206
# ...
207-
207+
208208
access_control:
209209
# require ROLE_ADMIN for /admin*
210210
- { path: ^/admin, roles: ROLE_ADMIN }
@@ -270,6 +270,7 @@ But who can you login as? Where do users come from?
270270
or :doc:`build your own </cookbook/security/custom_authentication_provider>`.
271271

272272
.. _security-user-providers:
273+
.. _where-do-users-come-from-user-providers:
273274

274275
B) Configuring how Users are Loaded
275276
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -427,6 +428,7 @@ If you'd like to load your users via the Doctrine ORM, that's easy! See
427428
:doc:`/cookbook/security/entity_provider` for all the details.
428429

429430
.. _book-security-encoding-user-password:
431+
.. _encoding-the-user-s-password:
430432

431433
C) Encoding the Users Password
432434
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -668,7 +670,7 @@ URL pattern. You saw this earlier, where anything matching the regular expressio
668670
# ...
669671
firewalls:
670672
# ...
671-
673+
672674
access_control:
673675
# require ROLE_ADMIN for /admin*
674676
- { path: ^/admin, roles: ROLE_ADMIN }
@@ -834,9 +836,9 @@ in this chapter).
834836
Be careful with this in your layout or on your error pages! Because of
835837
some internal Symfony details, to avoid broken error pages in the ``prod``
836838
environment, wrap calls in these templates with a check for ``app.user``:
837-
839+
838840
.. code-block:: html+jinja
839-
841+
840842
{% if app.user and is_granted('ROLE_ADMIN') %}
841843

842844
Securing other Services
@@ -970,7 +972,7 @@ the User object, and use the ``isGranted`` method (or
970972

971973
// boo :(. Never check for the User object to see if they're logged in
972974
if ($this->getUser()) {
973-
975+
974976
}
975977

976978
Retrieving the User in a Template
@@ -989,7 +991,7 @@ key:
989991

990992
.. code-block:: html+php
991993

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

0 commit comments

Comments
 (0)
0