src/Graviton/SecurityBundle/Service/SecurityUtils.php
public function hasRole($role)
    {
        if ($this->isSecurityUser()) {
            return (bool) $this->securityUser->hasRole($role);
        }
        throw new UsernameNotFoundException('No security user');
    }
public function hasRole($role)
    {
        if ($this->isSecurityUser()) {
            return (bool) $this->securityUser->hasRole($role);
        }
        throw new UsernameNotFoundException('No security user');
    }
public function hasRole ( $ role ) { if ( $ this -> isSecurityUser ( ) ) { return ( bool ) $ this -> securityUser -> hasRole ( $ role ) ; } throw new UsernameNotFoundException ( 'No security user' ) ; }
Check if current user is in Role

@param string $role User role expected
@return bool
@throws UsernameNotFoundException
Check if current user is in Role