SensioFrameworkExtraBundle icon indicating copy to clipboard operation
SensioFrameworkExtraBundle copied to clipboard

@Security method has problem with change the ROLE

Open quberok opened this issue 9 years ago • 0 comments

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

quberok avatar Nov 18 '14 14:11 quberok