Skip to content

Commit 2ca3840

Browse files
authored
access_control setup in the login form documentation
Add access_control property in security.yml file in order to allow anonymous authenticated users to access the /login route
1 parent 3e95bca commit 2ca3840

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

security/form_login_setup.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class that processes the login submit and 4) updates the main security config fi
7373
}
7474
}
7575

76-
Edit the security.yml file in order to allow access to the ``/login``route ::
76+
Edit the security.yml file in order to allow access to the ``/login`` route :
7777

7878
.. configuration-block::
7979

@@ -90,7 +90,7 @@ Edit the security.yml file in order to allow access to the ``/login``route ::
9090
.. code-block:: xml
9191
9292
<!-- config/packages/security.xml -->
93-
<?xml version="1.0" encoding="UTF-8"?>
93+
<?xml version="1.0" charset="UTF-8" ?>
9494
<srv:container xmlns="http://symfony.com/schema/dic/security"
9595
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9696
xmlns:srv="http://symfony.com/schema/dic/services"
@@ -105,7 +105,7 @@ Edit the security.yml file in order to allow access to the ``/login``route ::
105105
106106
.. code-block:: php
107107
108-
// config/packages/security.php
108+
// app/config/security.php
109109
$container->loadFromExtension('security', [
110110
// ...
111111
'access_control' => [
@@ -117,7 +117,6 @@ Edit the security.yml file in order to allow access to the ``/login``route ::
117117
],
118118
]);
119119
120-
121120
**Step 2.** The template has very little to do with security: it just generates
122121
a traditional HTML form that submits to ``/login``:
123122

0 commit comments

Comments
 (0)