Reputation: 5129
I'm using following Acess Control in security.yml:
- { path: ^/g/+/submit, roles: IS_AUTHENTICATED_FULLY }
the "+" should make any word match, but it does not work if I try any of the urls like:
/g/something/submit
/g/somethingelse/submit
Are regular expressions not fully working in access controls in symfony2? Is there a workaround?
Upvotes: 1
Views: 1081
Reputation: 5129
Ok, the problem was that I forgot to put a dot before the +. so a correct regex would be:
- { path: ^/g/.+/submit, roles: IS_AUTHENTICATED_FULLY }
Upvotes: 1