public function hasRole($role)
    {
        $roles = $this->getRoles();
        /** @var Role $roleObject */
        foreach ($roles as $roleObject) {
            if ($roleObject->getRole() == strtoupper($role)) {
                return true;
            }
        }
        return false;
    }