diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-23 15:09:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-11-23 15:09:11 +0300 |
commit | 15ea3fec22d1efd1945d390b21ff65461290dfc1 (patch) | |
tree | f5703fc0c0c4ab49eef0cc5449fb08f570b7a16b /doc/api/users.md | |
parent | 8132e39e1b5a7829b8b7ed8bd0482e1812a9eeef (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/users.md')
-rw-r--r-- | doc/api/users.md | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 0d837924507..9b9005754d2 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -1275,8 +1275,8 @@ Parameters: Returns: - `201 OK` on success. -- `404 User Not Found` if user cannot be found. -- `403 Forbidden` when trying to activate a user blocked by admin or by LDAP synchronization. +- `404 User Not Found` if the user cannot be found. +- `403 Forbidden` if the user cannot be activated because they are blocked by an administrator or by LDAP synchronization. ### Get user contribution events @@ -1337,6 +1337,44 @@ Example response: ] ``` +## Approve user + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/263107) in GitLab 13.7. + +Approves the specified user. Available only for administrators. + +```plaintext +POST /users/:id/approve +``` + +Parameters: + +- `id` (required) - ID of specified user + +```shell +curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/users/42/approve" +``` + +Returns: + +- `201 OK` on success. +- `404 User Not Found` if user cannot be found. +- `403 Forbidden` if the user cannot be approved because they are blocked by an administrator or by LDAP synchronization. + +Example Responses: + +```json +{ "message": "Success" } +``` + +```json +{ "message": "404 User Not Found" } +``` + +```json +{ "message": "The user you are trying to approve is not pending an approval" } +``` + ## Get an impersonation token of a user > Requires admin permissions. |