2019-11-12 00:06:21 +00:00
|
|
|
---
|
|
|
|
type: howto
|
|
|
|
---
|
|
|
|
|
|
|
|
# Activating and deactivating users
|
|
|
|
|
2019-11-12 06:06:32 +00:00
|
|
|
GitLab administrators can deactivate and activate users.
|
|
|
|
|
2019-11-12 00:06:21 +00:00
|
|
|
## Deactivating a user
|
|
|
|
|
2020-05-22 03:08:28 +00:00
|
|
|
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22257) in GitLab 12.4.
|
2019-11-12 00:06:21 +00:00
|
|
|
|
2019-11-12 06:06:32 +00:00
|
|
|
In order to temporarily prevent access by a GitLab user that has no recent activity, administrators
|
|
|
|
can choose to deactivate the user.
|
2019-11-12 00:06:21 +00:00
|
|
|
|
2019-11-12 06:06:32 +00:00
|
|
|
Deactivating a user is functionally identical to [blocking a user](blocking_unblocking_users.md),
|
|
|
|
with the following differences:
|
2019-11-12 00:06:21 +00:00
|
|
|
|
|
|
|
- It does not prohibit the user from logging back in via the UI.
|
|
|
|
- Once a deactivated user logs back into the GitLab UI, their account is set to active.
|
|
|
|
|
|
|
|
A deactivated user:
|
|
|
|
|
|
|
|
- Cannot access Git repositories or the API.
|
|
|
|
- Will not receive any notifications from GitLab.
|
2019-11-12 06:06:32 +00:00
|
|
|
- Will not be able to use [slash commands](../../integration/slash_commands.md).
|
2019-11-12 00:06:21 +00:00
|
|
|
|
2019-11-12 06:06:32 +00:00
|
|
|
Personal projects, and group and user history of the deactivated user will be left intact.
|
2019-11-12 00:06:21 +00:00
|
|
|
|
2019-11-12 06:06:32 +00:00
|
|
|
A user can be deactivated from the Admin Area. To do this:
|
2019-11-12 00:06:21 +00:00
|
|
|
|
|
|
|
1. Navigate to **Admin Area > Overview > Users**.
|
|
|
|
1. Select a user.
|
|
|
|
1. Under the **Account** tab, click **Deactivate user**.
|
|
|
|
|
|
|
|
Please note that for the deactivation option to be visible to an admin, the user:
|
|
|
|
|
|
|
|
- Must be currently active.
|
2020-03-19 09:09:27 +00:00
|
|
|
- Must not have any signins or activity in the last 180 days.
|
2019-11-12 00:06:21 +00:00
|
|
|
|
2020-01-24 00:08:51 +00:00
|
|
|
Users can also be deactivated using the [GitLab API](../../api/users.md#deactivate-user).
|
2019-11-12 00:06:21 +00:00
|
|
|
|
|
|
|
NOTE: **Note:**
|
2020-02-26 09:08:47 +00:00
|
|
|
A deactivated user does not consume a [seat](../../subscriptions/index.md#choosing-the-number-of-users).
|
2019-11-12 00:06:21 +00:00
|
|
|
|
|
|
|
## Activating a user
|
|
|
|
|
2020-05-22 03:08:28 +00:00
|
|
|
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/22257) in GitLab 12.4.
|
2019-11-12 00:06:21 +00:00
|
|
|
|
2019-11-12 06:06:32 +00:00
|
|
|
A deactivated user can be activated from the Admin Area.
|
2019-11-12 00:06:21 +00:00
|
|
|
|
|
|
|
To do this:
|
|
|
|
|
|
|
|
1. Navigate to **Admin Area > Overview > Users**.
|
|
|
|
1. Click on the **Deactivated** tab.
|
|
|
|
1. Select a user.
|
|
|
|
1. Under the **Account** tab, click **Activate user**.
|
|
|
|
|
2020-01-24 00:08:51 +00:00
|
|
|
Users can also be activated using the [GitLab API](../../api/users.md#activate-user).
|
2019-11-12 00:06:21 +00:00
|
|
|
|
|
|
|
NOTE: **Note:**
|
2019-11-12 06:06:32 +00:00
|
|
|
Activating a user will change the user's state to active and it consumes a
|
2020-02-26 09:08:47 +00:00
|
|
|
[seat](../../subscriptions/index.md#choosing-the-number-of-users).
|
2019-11-12 00:06:21 +00:00
|
|
|
|
|
|
|
TIP: **Tip:**
|
2020-05-21 03:08:00 +00:00
|
|
|
A deactivated user can also activate their account themselves by simply logging back in via the UI.
|