diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-26 12:11:15 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-26 12:11:15 +0300 |
commit | c8a7e4ada117b968f841c2bb300fadc421cb3e98 (patch) | |
tree | c7c84dd22cd56ea8ed228f91f4ab33c5a1e751fc /doc/api/users.md | |
parent | b692f9afa047ef24c54ab185b499628d9873122a (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/api/users.md')
-rw-r--r-- | doc/api/users.md | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/doc/api/users.md b/doc/api/users.md index e09eb0d8144..aca18b1d55e 100644 --- a/doc/api/users.md +++ b/doc/api/users.md @@ -1467,6 +1467,46 @@ Returns: - `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. +## Ban user + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327354) in GitLab 14.3. + +Bans the specified user. Available only for admin. + +```plaintext +POST /users/:id/ban +``` + +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 ban a user that is not active. + +## Unban user + +> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/327354) in GitLab 14.3. + +Unbans the specified user. Available only for admin. + +```plaintext +POST /users/:id/unban +``` + +Parameters: + +- `id` (required) - ID of specified user + +Returns: + +- `201 OK` on success. +- `404 User Not Found` if the user cannot be found. +- `403 Forbidden` when trying to unban a user that is not banned. + ### Get user contribution events Please refer to the [Events API documentation](events.md#get-user-contribution-events) |