Itxaka/pyapi-gitlab — pull request #86 by Tenzer (2014-07-25 09:34:48+00:00)
Title: Addgroupmember fixes

I was bitten by quite a few different aspects to the `addgroupmember()` method:

* First of all, the `access_level` parameter doesn't accept the same input as the GitLab API, even though it refers to the GitLab API documentation for help.
* It doesn't map all the available access levels into the number format that GitLab expects, so it isn't possible to add a user with the Owner access level.
* In case you enter an access level it doesn't recognize the Guest access level is used, which I think is bad practice. It should rather fail than trying to do something you don't expect.

This pull request rectifies the above aspects while retaining backwards compatibility.

I also by mistake sent a user name in the `user_id` field which didn't give any error back. While a check for that could also be added in the API (just make sure it's an integer), I have instead opted to make a [bug report for GitLab](https://gitlab.com/gitlab-org/gitlab-ce/issues/450) to at least make them check the user_id, so it doesn't mess with the system.