Skip to content

admin does not work when creating user #22

Closed

Description

@marcolefo

Hello again

I think I have found an other bug, sorry ;)

When creating user, the "admin" parameters does not work :

>>> u=gl.User({"username": "john", "email": "john@youpi.fr", "name": "John", "password": "toto12345", "projects_limit": 10, "admin": True, "can_create_group": True})
>>> u.save()
>>> print u.admin
True
>>> print u
<class 'gitlab.User'> => {u'can_create_project': True, u'twitter': None, u'linkedin': None, u'color_scheme_id': 1, u'skype': None, u'id': 55, 'projects_limit': 10, u'state': u'active', u'provider': None, u'extern_uid': None, 'email': u'john@youpi.fr', u'website_url': None, 'username': u'john', u'bio': None, 'can_create_group': None, u'is_admin': None, 'password': 'toto12345', 'name': u'John', 'admin': True, u'created_at': u'2014-02-21T12:54:02.098+01:00', 'gitlab': <gitlab.Gitlab object at 0x7f10014f0310>, u'theme_id': 2}

Here we see that "is_admin" value is None.

Activity

  1. marcolefo commented on Feb 21, 2014

    @marcolefo
    Author

    That's working if I use 0 or 1 instead of False or True.

    >>> u=gl.User({"username": "john", "email": "john@youpi.fr", "name": "John", "password": "toto12345", "projects_limit": 10, "admin": 1, "can_create_group": True})
    >>> u.save()
    >>> print u
    <class 'gitlab.User'> => {u'can_create_project': True, u'twitter': None, u'linkedin': None, u'color_scheme_id': 1, u'skype': None, u'id': 56, 'projects_limit': 10, u'state': u'active', u'provider': None, u'extern_uid': None, 'email': u'john@youpi.fr', u'website_url': None, 'username': u'john', u'bio': None, 'can_create_group': None, u'is_admin': True, 'password': 'toto12345', 'name': u'John', 'admin': 1, u'created_at': u'2014-02-21T13:01:50.100+01:00', 'gitlab': <gitlab.Gitlab object at 0x7f10014f0310>, u'theme_id': 2}
  2. locked as resolved and limited conversation to collaborators on Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions