how can I tell that I want url for example like /users/{id}/confirm
to be publically available????
I tried with
- { path: ^/users/{id}/confirm, roles: PUBLIC_ACCESS }
and syntax is incorrect, also I tried to cover url with quotes and getting 404 response.
Third try:
- { path: ^/users/[0-9a-f]{8}-[0-9a-f]{4}-1[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/confirm, roles: PUBLIC_ACCESS }
yaml incorrect
2
Answers
And in your controller, you can use annotations or attributes restrictions :
More infos : https://symfony.com/doc/current/security/access_control.html#2-access-enforcement
Maybe to try with differents roles in your restriction attributes/annotations
instead of using id placeholder you need to use numeric placeholder