[Maintenance] Improve note in UPGRADE file about changes in security.yaml

This commit is contained in:
Grzegorz Sadowski 2022-09-16 07:15:59 +02:00
parent e4b0bcea22
commit c57735609c
No known key found for this signature in database
GPG key ID: EF87FF4E6E3BD364

View file

@ -40,39 +40,39 @@ with test or remove these services with complier pass.
8. Due to updating to Symfony 6 security file was changed to use the updated security system so you need to adjust your `config/packages/security.yaml` file:
```diff
```diff
security:
- always_authenticate_before_granting: true
+ enable_authenticator_manager: true
- always_authenticate_before_granting: true
+ enable_authenticator_manager: true
```
and you need to adjust all of your firewalls like that:
```diff
admin:
# ...
form_login:
# ...
- csrf_token_generator: security.csrf.token_manager
+ enable_csrf: true
# ...
new_api_admin_user:
# ...
- anonymous: true
+ entry_point: jwt
# ...
- guard:
# ...
+ jwt: true
admin:
# ...
form_login:
# ...
- csrf_token_generator: security.csrf.token_manager
+ enable_csrf: true
# ...
new_api_admin_user:
# ...
- anonymous: true
+ entry_point: jwt
# ...
- guard:
- authenticators:
- # ...
+ jwt: true
```
and also you need to adjust all of your access_control like that:
```diff
- - { path: "%sylius.security.admin_regex%/forgotten-password", role: IS_AUTHENTICATED_ANONYMOUSLY }
+ - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS }
```
```diff
- - { path: "%sylius.security.admin_regex%/forgotten-password", role: IS_AUTHENTICATED_ANONYMOUSLY }
+ - { path: "%sylius.security.admin_regex%/forgotten-password", role: PUBLIC_ACCESS }
```
### Asset management changes