SensioFrameworkExtraBundle
SensioFrameworkExtraBundle copied to clipboard
@Security method has problem with change the ROLE
I use FOSUserBundle master version.
config FosUserBundle:
security:
always_authenticate_before_granting: true
Access denied after change the ROLE:
/**
* @Security("has_role('ROLE_USER')")
*/
public function indexAction()
{
}
Access succesfull after change the ROLE:
public function indexAction()
{
if ($this->getUser()->hasRole("ROLE_USER"))
{
}
}
It work correctly after second page reload