diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 00:06:44 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-10 00:06:44 +0000 |
commit | 308146dc398fd4c13453048105498018459e0985 (patch) | |
tree | d843eb63c1672e4b18c483907e2cd4aa7fca708e /doc/api | |
parent | 4b28d5ae770c6bd332283a3f13ceae06329c409b (diff) | |
download | gitlab-ce-308146dc398fd4c13453048105498018459e0985.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/users.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index 1a1f45a259b..33b6efa7a02 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -1152,6 +1152,48 @@ Parameters: 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. +## Deactivate user + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/63921) in GitLab 12.4. + +Deactivates the specified user. Available only for admin. + +``` +POST /users/:id/deactivate +``` + +Parameters: + +- `id` (required) - id of specified user + +Returns: + +- `201 OK` on success. +- `404 User Not Found` if user cannot be found. +- `403 Forbidden` when trying to deactivate a user: + - Blocked by admin or by LDAP synchronization. + - That has any activity in past 14 days. These cannot be deactivated. + +## Activate user + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/63921) in GitLab 12.4. + +Activates the specified user. Available only for admin. + +``` +POST /users/:id/activate +``` + +Parameters: + +- `id` (required) - id of specified user + +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. + ### Get user contribution events Please refer to the [Events API documentation](events.md#get-user-contribution-events) |