Skip to content

Commit ac33c46

Browse files
committed
Merge branch '5.4' into 6.0
* 5.4: Replacing deprecated role: IS_AUTHENTICATED_ANONYMOUSLY
2 parents 9af6b31 + bc121fb commit ac33c46

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

security/entry_point.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ split the configuration into two separate firewalls:
167167
->formLogin();
168168
169169
$accessControl = $security->accessControl();
170-
$accessControl->path('^/login')->roles(['IS_AUTHENTICATED_ANONYMOUSLY']);
170+
$accessControl->path('^/login')->roles(['PUBLIC_ACCESS']);
171171
$accessControl->path('^/api')->roles(['ROLE_API_USER']);
172172
$accessControl->path('^/')->roles(['ROLE_USER']);
173173
};

security/force_https.rst

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ access control:
2424
2525
access_control:
2626
- { path: '^/secure', roles: ROLE_ADMIN, requires_channel: https }
27-
- { path: '^/login', roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
27+
- { path: '^/login', roles: PUBLIC_ACCESS, requires_channel: https }
2828
# catch all other URLs
29-
- { path: '^/', roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https }
29+
- { path: '^/', roles: PUBLIC_ACCESS, requires_channel: https }
3030
3131
.. code-block:: xml
3232
@@ -43,17 +43,9 @@ access control:
4343
<config>
4444
<!-- ... -->
4545
46-
<rule path="^/secure"
47-
role="ROLE_ADMIN"
48-
requires-channel="https"/>
49-
<rule path="^/login"
50-
role="IS_AUTHENTICATED_ANONYMOUSLY"
51-
requires-channel="https"
52-
/>
53-
<rule path="^/"
54-
role="IS_AUTHENTICATED_ANONYMOUSLY"
55-
requires-channel="https"
56-
/>
46+
<rule path="^/secure" role="ROLE_ADMIN" requires-channel="https"/>
47+
<rule path="^/login" role="PUBLIC_ACCESS" requires-channel="https"/>
48+
<rule path="^/" role="PUBLIC_ACCESS" requires-channel="https"/>
5749
</config>
5850
</srv:container>
5951
@@ -73,13 +65,13 @@ access control:
7365
7466
$security->accessControl()
7567
->path('^/login')
76-
->roles(['IS_AUTHENTICATED_ANONYMOUSLY'])
68+
->roles(['PUBLIC_ACCESS'])
7769
->requiresChannel('https')
7870
;
7971
8072
$security->accessControl()
8173
->path('^/')
82-
->roles(['IS_AUTHENTICATED_ANONYMOUSLY'])
74+
->roles(['PUBLIC_ACCESS'])
8375
->requiresChannel('https')
8476
;
8577
};

0 commit comments

Comments
 (0)