Access Control regex symfony 2 -
i need configure access control part of symfony website. want access :
/ : homepage /login : login page /login_check : check login page fosuserbundle /register : register page of fosuserbundle /resetting/request : resetting password page of fosuserbundle and want user authenticated rest, example : /abc, /xxx, /yy/xx ...etc
i put in security.yml, don't work, user have full access in case :
access_control: - { path: /_wdt/.*, role: is_authenticated_anonymously } - { path: /_profiler/.*, role: is_authenticated_anonymously } - { path: /login, role: is_authenticated_anonymously } - { path: /login_check, role: is_authenticated_anonymously } - { path: /resetting/request, role: is_authenticated_anonymously } - { path: /register, role: is_authenticated_anonymously } - { path: /, role: is_authenticated_anonymously } - { path: /*, role: is_authenticated_fully } what's problem ?
thanks ;)
the problem you're missing period in last line:
- { path: /*, role: is_authenticated_fully } ^^^^^ /* means 0 or more slashes (/) .. .it should /.* indicate anything followed slash
correct entry should like:
- { path: /.*, role: is_authenticated_fully }
Comments
Post a Comment