From a0fe68bc07c9b551a7daec87b31f481878f4d450 Mon Sep 17 00:00:00 2001 From: pa4373 Date: Thu, 24 Sep 2015 01:01:08 +0800 Subject: [PATCH] Can bypassing confirm when creating new user --- gitlab/__init__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gitlab/__init__.py b/gitlab/__init__.py index 45bbf0898..2fbe2fa35 100644 --- a/gitlab/__init__.py +++ b/gitlab/__init__.py @@ -854,7 +854,13 @@ class User(GitlabObject): requiredCreateAttrs = ['email', 'username', 'name'] optionalCreateAttrs = ['password', 'skype', 'linkedin', 'twitter', 'projects_limit', 'extern_uid', 'provider', - 'bio', 'admin', 'can_create_group', 'website_url'] + 'bio', 'admin', 'can_create_group', 'website_url', + 'confirm'] + + def _data_for_gitlab(self, extra_parameters={}): + if hasattr(self, 'confirm'): + self.confirm = str(self.confirm).lower() + return super(User, self)._data_for_gitlab(extra_parameters) def Key(self, id=None, **kwargs): return UserKey._get_list_or_object(self.gitlab, id,