mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
[Maintenance] Improve note in UPGRADE file about changes in security.yaml
This commit is contained in:
parent
e4b0bcea22
commit
c57735609c
1 changed files with 23 additions and 23 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue