    def _check_group_whitelist(self, username, user_id, is_admin, access_token):
        http_client = AsyncHTTPClient()
        headers = _api_headers(access_token)
        # Check if we are a member of each group in the whitelist
        for group in map(url_escape, self.gitlab_group_whitelist):
            url = "%s/groups/%s/members/%d" % (GITLAB_API, group, user_id)
            req = HTTPRequest(url, method="GET", headers=headers)
            resp = yield http_client.fetch(req, raise_error=False)
            if resp.code == 200:
                return True  # user _is_ in group
        return False