protected function authRoles(UserInterface $user)
    {
        if (empty($this->roles)) {
            return true;
        }

        foreach ($this->roles as $role) {
            if ($user->hasRole($role)) {
                return true;
            }
        }

        return false;
    }
protected function authRoles(UserInterface $user)
    {
        if (empty($this->roles)) {
            return true;
        }

        foreach ($this->roles as $role) {
            if ($user->hasRole($role)) {
                return true;
            }
        }

        return false;
    }
protected function authRoles ( UserInterface $ user ) { if ( empty ( $ this -> roles ) ) { return true ; } foreach ( $ this -> roles as $ role ) { if ( $ user -> hasRole ( $ role ) ) { return true ; } } return false ; }
Returns true if use has role to access area

@param UserInterface $user

@return bool
Returns true if use has role to access area