You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Learn more on how to [create a user provider on the Symfony documentation](https://symfony.com/doc/current/security.html#the-user)
@@ -52,8 +53,8 @@ Learn more on how to [create a user provider on the Symfony documentation](https
52
53
53
54
Here is an example of how to configure a firewall for your admin routes:
54
55
56
+
{% code title="config/packages/security.yaml" %}
55
57
```yaml
56
-
# config/packages/security.yaml
57
58
security:
58
59
firewalls:
59
60
# ...
@@ -71,6 +72,7 @@ security:
71
72
path: sylius_admin_ui_logout
72
73
target: sylius_admin_ui_login
73
74
```
75
+
{% endcode %}
74
76
75
77
{% hint style="info" %}
76
78
Learn more on how to [configure the firewall on the Symfony documentation](https://symfony.com/doc/current/security.html#the-firewall)
@@ -80,15 +82,16 @@ Learn more on how to [configure the firewall on the Symfony documentation](https
80
82
81
83
Only admin users will have access to "/admin" routes.
82
84
85
+
{% code title="config/packages/security.yaml" %}
83
86
```yaml
84
-
# config/packages/security.yaml
85
87
security:
86
88
access_control:
87
89
- { path: ^/admin/login, roles: PUBLIC_ACCESS }
88
90
- { path: ^/admin/logout, roles: PUBLIC_ACCESS }
89
91
- { path: ^/admin, roles: ROLE_ADMIN }
90
92
- { path: ^/, roles: PUBLIC_ACCESS }
91
93
```
94
+
{% endcode %}
92
95
93
96
{% hint style="info" %}
94
97
Learn more on how to [configure Access Control Authorization on the Symfony documentation](https://symfony.com/doc/current/security.html#access-control-authorization)
0 commit comments