Security/User/SamlUser.php
public function hasRole($role)
    {
        foreach ($this->roles as $k => $r) { 
            $roles[$k] = $r instanceof RoleInterface ? $r->getRole() : (string) $r;  
        } 
        $roles = array_flip(array_flip($roles));
        
        return in_array($role, $roles);
    }
public function hasRole($role)
    {
        foreach ($this->roles as $k => $r) { 
            $roles[$k] = $r instanceof RoleInterface ? $r->getRole() : (string) $r;  
        } 
        $roles = array_flip(array_flip($roles));
        
        return in_array($role, $roles);
    }
@param string $role

@return boolean