Skip to content

Commit

Permalink
Fix the 'password' requirement for User creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Gauvain Pocentek committed Jan 30, 2016
1 parent 16d50cd commit c579c80
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions gitlab/objects.py
Expand Up @@ -503,11 +503,14 @@ class UserKeyManager(BaseManager):
class User(GitlabObject):
_url = '/users'
shortPrintAttr = 'username'
# FIXME: password is required for create but not for update
requiredCreateAttrs = ['email', 'username', 'name']
optionalCreateAttrs = ['password', 'skype', 'linkedin', 'twitter',
'projects_limit', 'extern_uid', 'provider',
'bio', 'admin', 'can_create_group', 'website_url',
requiredCreateAttrs = ['email', 'username', 'name', 'password']
optionalCreateAttrs = ['skype', 'linkedin', 'twitter', 'projects_limit',
'extern_uid', 'provider', 'bio', 'admin',
'can_create_group', 'website_url', 'confirm']
requiredUpdateAttrs = ['email', 'username', 'name']
optionalUpdateAttrs = ['password', 'skype', 'linkedin', 'twitter',
'projects_limit', 'extern_uid', 'provider', 'bio',
'admin', 'can_create_group', 'website_url',
'confirm']
managers = [('keys', UserKeyManager, [('user_id', 'id')])]

Expand Down

0 comments on commit c579c80

Please sign in to comment.