Skip to content
Snippets Groups Projects
Commit dffeff55 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent d5e04160
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -59,7 +59,7 @@ class User < ApplicationRecord
# Removed in GitLab 12.3. Keep until after 2019-09-22.
self.ignored_columns += %i[support_bot]
 
MINIMUM_INACTIVE_DAYS = 14
MINIMUM_INACTIVE_DAYS = 180
 
# Override Devise::Models::Trackable#update_tracked_fields!
# to limit database writes to at most once every hour
Loading
Loading
---
title: Increased deactivation threshold to 180 days
merge_request: 18902
author:
type: changed
Loading
Loading
@@ -1172,7 +1172,7 @@ Returns:
- `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.
- That has any activity in past 180 days. These users cannot be deactivated.
 
## Activate user
 
Loading
Loading
Loading
Loading
@@ -71,7 +71,7 @@ To do this:
Please note that for the deactivation option to be visible to an admin, the user:
 
- Must be currently active.
- Should not have any activity in the last 14 days.
- Should not have any activity in the last 180 days.
 
### Activating a user
 
Loading
Loading
Loading
Loading
@@ -123,7 +123,7 @@ describe Admin::UsersController do
put :deactivate, params: { id: user.username }
user.reload
expect(user.deactivated?).to be_falsey
expect(flash[:notice]).to eq("The user you are trying to deactivate has been active in the past 14 days and cannot be deactivated")
expect(flash[:notice]).to eq("The user you are trying to deactivate has been active in the past #{::User::MINIMUM_INACTIVE_DAYS} days and cannot be deactivated")
end
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment