Moderate users
GitLab administrators can moderate user access by blocking, banning, or deactivating users.
Blocking and unblocking users
GitLab administrators can block and unblock users.
Blocking a user
In order to completely prevent access of a user to the GitLab instance, administrators can choose to block the user.
Users can be blocked via an abuse report, or directly from the Admin Area. To do this:
- On the top bar, select Menu > Admin.
- On the left sidebar, select Overview > Users.
- Select a user.
- Under the Account tab, select Block user.
A blocked user:
- Cannot log in.
- Cannot access Git repositories or the API.
- Does not receive any notifications from GitLab.
- Cannot use slash commands.
Personal projects, and group and user history of the blocked user are left intact.
Users can also be blocked using the GitLab API.
Unblocking a user
A blocked user can be unblocked from the Admin Area. To do this:
- On the top bar, select Menu > Admin.
- On the left sidebar, select Overview > Users.
- Select on the Blocked tab.
- Select a user.
- Under the Account tab, select Unblock user.
Users can also be unblocked using the GitLab API.
Activating and deactivating users
GitLab administrators can deactivate and activate users.
Deactivating a user
Introduced in GitLab 12.4.
In order to temporarily prevent access by a GitLab user that has no recent activity, administrators can choose to deactivate the user.
Deactivating a user is functionally identical to blocking a user, with the following differences:
- 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.
- Does not receive any notifications from GitLab.
- Does not be able to use slash commands.
Personal projects, and group and user history of the deactivated user are left intact.
A user can be deactivated from the Admin Area. To do this:
- On the top bar, select Menu > Admin.
- On the left sidebar, select Overview > Users.
- Select a user.
- Under the Account tab, select Deactivate user.
Please note that for the deactivation option to be visible to an admin, the user:
- Must be currently active.
- Must not have signed in, or have any activity, in the last 90 days.
Users can also be deactivated using the GitLab API.
Automatically deactivate dormant users
Introduced in GitLab 14.0.
Administrators can enable automatic deactivation of users who have not signed in, or have no activity in the last 90 days. To do this:
- On the top bar, select Menu > Admin.
- On the left sidebar, select Settings > General.
- Expand the Account and limit section.
- Under Dormant users, check Deactivate dormant users after 90 days of inactivity.
- Select Save changes.
When this feature is enabled, GitLab runs a job once a day to deactivate the dormant users.
A maximum of 100,000 users can be deactivated per day.
Activating a user
Introduced in GitLab 12.4.
A deactivated user can be activated from the Admin Area.
To do this:
- On the top bar, select Menu > Admin.
- On the left sidebar, select Overview > Users.
- Select the Deactivated tab.
- Select a user.
- Under the Account tab, select Activate user.
Users can also be activated using the GitLab API.
Ban and unban users
Introduced in GitLab 13.12.
GitLab administrators can ban users.
Ban a user
To completely block a user, administrators can choose to ban the user.
Users can be banned using the Admin Area. To do this:
- On the top bar, select Menu > Admin.
- On the left sidebar, select Overview > Users.
- Select a user.
- Under the Account tab, select Ban user.
Unban a user
A banned user can be unbanned using the Admin Area. To do this:
- On the top bar, select Menu > Admin.
- On the left sidebar, select Overview > Users.
- Select the Banned tab.
- Select a user.
- Under the Account tab, select Unban user.