i use symfony 3 , have issue when using access_control
in app/config/security.yml
.
i installed fosuserbundle , discovered routes /login /resetting , /register still available when user has role is_authenticated_anonymously
. use basic configuration explained in the documentation doesn't works :
access_control: - { path: ^/login$, role: is_authenticated_anonymously } - { path: ^/register, role: is_authenticated_anonymously } - { path: ^/resetting, role: is_authenticated_anonymously } - { path: ^/admin/, role: role_admin }
is there possibility error comes file ? spent week searching answer , can't figure out problem coming from. also, tried reinstall symfony on project scratch try fresh configuration , same error occurs.
thank !
by default, routes /login
, /resetting
, /register
continue available when logged in.
if not want this, can several things:
- override
fosuserbundle:security
controller, , redirect somewhere when logged in. - override templates , not display form when logged in
Comments
Post a Comment