diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-20 15:16:23 +0000 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-02-20 15:16:23 +0000 |
commit | fbbbf1e4e77768a40b835455f17749384f7c4984 (patch) | |
tree | 641ea53edc2509be47280a03ec675c2dd97cc94f /doc | |
parent | 173dbeb972d0da365ac77129d0e12727ae571e91 (diff) | |
parent | 8f690604a523115370c011c767dbd76cb85c0f63 (diff) | |
download | gitlab-ce-fbbbf1e4e77768a40b835455f17749384f7c4984.tar.gz |
Merge branch 'api-post-block' into 'master'
API: Use POST to (un)block a user
Closes #14596
See merge request !9371
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/users.md | 8 | ||||
-rw-r--r-- | doc/api/v3_to_v4.md | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 626f7e63e3e..852c7ac8ec2 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -659,14 +659,14 @@ Will return `200 OK` on success, or `404 Not found` if either user or email cann Blocks the specified user. Available only for admin. ``` -PUT /users/:id/block +POST /users/:id/block ``` Parameters: - `id` (required) - id of specified user -Will return `200 OK` on success, `404 User Not Found` is user cannot be found or +Will return `201 OK` on success, `404 User Not Found` is user cannot be found or `403 Forbidden` when trying to block an already blocked user by LDAP synchronization. ## Unblock user @@ -674,14 +674,14 @@ Will return `200 OK` on success, `404 User Not Found` is user cannot be found or Unblocks the specified user. Available only for admin. ``` -PUT /users/:id/unblock +POST /users/:id/unblock ``` Parameters: - `id` (required) - id of specified user -Will return `200 OK` on success, `404 User Not Found` is user cannot be found or +Will return `201 OK` on success, `404 User Not Found` is user cannot be found or `403 Forbidden` when trying to unblock a user blocked by LDAP synchronization. ### Get user contribution events diff --git a/doc/api/v3_to_v4.md b/doc/api/v3_to_v4.md index 0e7c5251329..2f82b6e97cc 100644 --- a/doc/api/v3_to_v4.md +++ b/doc/api/v3_to_v4.md @@ -26,3 +26,4 @@ changes are in V4: - Endpoints `/projects/owned`, `/projects/visible`, `/projects/starred` & `/projects/all` are consolidated into `/projects` using query parameters - Return pagination headers for all endpoints that return an array - Removed `DELETE projects/:id/deploy_keys/:key_id/disable`. Use `DELETE projects/:id/deploy_keys/:key_id` instead +- Moved `PUT /users/:id/(block|unblock)` to `POST /users/:id/(block|unblock)` |