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

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -