diff options
author | Boyan Tabakov <boyan.tabakov@futurice.com> | 2013-07-31 13:52:23 +0300 |
---|---|---|
committer | Boyan Tabakov <boyan.tabakov@futurice.com> | 2013-09-29 11:47:29 +0300 |
commit | 479631aafc525efef151309ac257e60c73230ac0 (patch) | |
tree | 37861481ca8fe6c26f78aa2edee3df1c7156eacd /doc/api/users.md | |
parent | cbb5b000c0c7593673683c08a402ea01a3a7f369 (diff) | |
download | gitlab-ce-479631aafc525efef151309ac257e60c73230ac0.tar.gz |
Extended User API to expose admin and can_create_group for user creation/updating.
Also, is_admin and can_create_group are exposed in the user information.
Fixed attributes_for_keys to process properly keys with boolean values (since false.present? is false).
Diffstat (limited to 'doc/api/users.md')
-rw-r--r-- | doc/api/users.md | 39 |
1 files changed, 24 insertions, 15 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 49afbab8c6a..50c0f560d87 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -23,7 +23,9 @@ GET /users "extern_uid": "john.smith", "provider": "provider_name", "theme_id": 1, - "color_scheme_id": 2 + "color_scheme_id": 2, + "is_admin": false, + "can_create_group": true }, { "id": 2, @@ -39,7 +41,9 @@ GET /users "extern_uid": "jack.smith", "provider": "provider_name", "theme_id": 1, - "color_scheme_id": 3 + "color_scheme_id": 3, + "is_admin": false, + "can_create_group": true } ] ``` @@ -72,7 +76,9 @@ Parameters: "extern_uid": "john.smith", "provider": "provider_name", "theme_id": 1, - "color_scheme_id": 2 + "color_scheme_id": 2, + "is_admin": false, + "can_create_group": true } ``` @@ -87,17 +93,19 @@ POST /users Parameters: -+ `email` (required) - Email -+ `password` (required) - Password -+ `username` (required) - Username -+ `name` (required) - Name -+ `skype` (optional) - Skype ID -+ `linkedin` (optional) - Linkedin -+ `twitter` (optional) - Twitter account -+ `projects_limit` (optional) - Number of projects user can create -+ `extern_uid` (optional) - External UID -+ `provider` (optional) - External provider name -+ `bio` (optional) - User's bio ++ `email` (required) - Email ++ `password` (required) - Password ++ `username` (required) - Username ++ `name` (required) - Name ++ `skype` (optional) - Skype ID ++ `linkedin` (optional) - Linkedin ++ `twitter` (optional) - Twitter account ++ `projects_limit` (optional) - Number of projects user can create ++ `extern_uid` (optional) - External UID ++ `provider` (optional) - External provider name ++ `bio` (optional) - User's bio ++ `admin` (optional) - User is admin - true or false (default) ++ `can_create_group` (optional) - User can create groups - true or false ## User modification @@ -121,6 +129,8 @@ Parameters: + `extern_uid` - External UID + `provider` - External provider name + `bio` - User's bio ++ `admin` (optional) - User is admin - true or false (default) ++ `can_create_group` (optional) - User can create groups - true or false Note, at the moment this method does only return a 404 error, even in cases where a 409 (Conflict) would be more appropriate, e.g. when renaming the email address to some existing one. @@ -166,7 +176,6 @@ GET /user "color_scheme_id": 2, "is_admin": false, "can_create_group" : true, - "can_create_team" : true, "can_create_project" : true } ``` |