src/Security/Authorization.php
public function isGranted($roles)
    {
        $this->parseRoles();

        $roles = (array) $roles;
        $intersection = array_intersect($roles, $this->roles);

        return count($intersection) > 0;
    }
public function isGranted($roles)
    {
        $this->parseRoles();

        $roles = (array) $roles;
        $intersection = array_intersect($roles, $this->roles);

        return count($intersection) > 0;
    }
public function isGranted ( $ roles ) { $ this -> parseRoles ( ) ; $ roles = ( array ) $ roles ; $ intersection = array_intersect ( $ roles , $ this -> roles ) ; return count ( $ intersection ) > 0 ; }
Check if user granted for roles
@param  string|array  $roles
@return boolean
Check if user granted for roles