Skip to content

Commit d8b9233

Browse files
committed
-
1 parent d12e34d commit d8b9233

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

security/access_control.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,35 +142,35 @@ See the following examples:
142142

143143
**URI** ``/admin/user``
144144
IP: ``127.0.0.1``, Port: ``80``, Host: ``example.com``, Method: ``GET``
145-
``access_control``: rule #2 (``ROLE_USER_IP``)
145+
**Rule applied**: rule #2 (``ROLE_USER_IP``)
146146
**Why?** The URI matches ``path`` and the IP matches ``ip``.
147147
**URI** ``/admin/user``
148148
IP: ``127.0.0.1``, Port: ``80``, Host: ``symfony.com``, Method: ``GET``
149-
``access_control``: rule #2 (``ROLE_USER_IP``)
149+
**Rule applied**: rule #2 (``ROLE_USER_IP``)
150150
**Why?** The ``path`` and ``ip`` still match. This would also match the
151151
``ROLE_USER_HOST`` entry, but *only* the **first** ``access_control`` match is used.
152152
**URI** ``/admin/user``
153153
IP: ``127.0.0.1``, Port: ``8080``, Host: ``symfony.com``, Method: ``GET``
154-
``access_control``: rule #1 (``ROLE_USER_PORT``)
154+
**Rule applied**: rule #1 (``ROLE_USER_PORT``)
155155
**Why?** The ``path``, ``ip`` and ``port`` match.
156156
**URI** ``/admin/user``
157157
IP: ``168.0.0.1``, Port: ``80``, Host: ``symfony.com``, Method: ``GET``
158-
``access_control``: rule #3 (``ROLE_USER_HOST``)
158+
**Rule applied**: rule #3 (``ROLE_USER_HOST``)
159159
**Why?** The ``ip`` doesn't match neither the first rule nor the second rule.
160160
So the third rule (which matches) is used.
161161
**URI** ``/admin/user``
162162
IP: ``168.0.0.1``, Port: ``80``, Host: ``symfony.com``, Method: ``POST``
163-
``access_control``: rule #3 (``ROLE_USER_HOST``)
163+
**Rule applied**: rule #3 (``ROLE_USER_HOST``)
164164
**Why?** The third rule still matches. This would also match the fourth rule
165165
(``ROLE_USER_METHOD``), but only the **first** matched ``access_control`` is used.
166166
**URI** ``/admin/user``
167167
IP: ``168.0.0.1``, Port: ``80``, Host: ``example.com``, Method: ``POST``
168-
``access_control``: rule #4 (``ROLE_USER_METHOD``)
168+
**Rule applied**: rule #4 (``ROLE_USER_METHOD``)
169169
**Why?** The ``ip`` and ``host`` don't match the first three entries, but
170170
the fourth - ``ROLE_USER_METHOD`` - matches and is used.
171171
**URI** ``/foo``
172172
IP: ``127.0.0.1``, Port: ``80``, Host: ``symfony.com``, Method: ``POST``
173-
``access_control``: matches no entries
173+
**Rule applied**: matches no entries
174174
**Why?** This doesn't match any ``access_control`` rules, since its URI
175175
doesn't match any of the ``path`` values.
176176

0 commit comments

Comments
 (0)