@@ -142,35 +142,35 @@ See the following examples:
142
142
143
143
**URI ** ``/admin/user ``
144
144
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 ``)
146
146
**Why? ** The URI matches ``path `` and the IP matches ``ip ``.
147
147
**URI ** ``/admin/user ``
148
148
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 ``)
150
150
**Why? ** The ``path `` and ``ip `` still match. This would also match the
151
151
``ROLE_USER_HOST `` entry, but *only * the **first ** ``access_control `` match is used.
152
152
**URI ** ``/admin/user ``
153
153
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 ``)
155
155
**Why? ** The ``path ``, ``ip `` and ``port `` match.
156
156
**URI ** ``/admin/user ``
157
157
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 ``)
159
159
**Why? ** The ``ip `` doesn't match neither the first rule nor the second rule.
160
160
So the third rule (which matches) is used.
161
161
**URI ** ``/admin/user ``
162
162
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 ``)
164
164
**Why? ** The third rule still matches. This would also match the fourth rule
165
165
(``ROLE_USER_METHOD ``), but only the **first ** matched ``access_control `` is used.
166
166
**URI ** ``/admin/user ``
167
167
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 ``)
169
169
**Why? ** The ``ip `` and ``host `` don't match the first three entries, but
170
170
the fourth - ``ROLE_USER_METHOD `` - matches and is used.
171
171
**URI ** ``/foo ``
172
172
IP: ``127.0.0.1 ``, Port: ``80 ``, Host: ``symfony.com ``, Method: ``POST ``
173
- `` access_control `` : matches no entries
173
+ ** Rule applied ** : matches no entries
174
174
**Why? ** This doesn't match any ``access_control `` rules, since its URI
175
175
doesn't match any of the ``path `` values.
176
176
0 commit comments