summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 00:06:29 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-23 00:06:29 +0000
commitdffeff5520e861dc6e7319b690c573186bbbd22e (patch)
tree21d4bba46452458b2854bcdd0b7de72622aa1bd8
parentd5e0416021aa6de53b89f9d415f368226d9326e5 (diff)
downloadgitlab-ce-dffeff5520e861dc6e7319b690c573186bbbd22e.tar.gz
Add latest changes from gitlab-org/gitlab@master
-rw-r--r--app/models/user.rb2
-rw-r--r--changelogs/unreleased/user-deactivation-minimum-days-extend.yml5
-rw-r--r--doc/api/users.md2
-rw-r--r--doc/user/profile/account/delete_account.md2
-rw-r--r--spec/controllers/admin/users_controller_spec.rb2
5 files changed, 9 insertions, 4 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 321a4080484..eec8ad6edbb 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -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
diff --git a/changelogs/unreleased/user-deactivation-minimum-days-extend.yml b/changelogs/unreleased/user-deactivation-minimum-days-extend.yml
new file mode 100644
index 00000000000..ac489e933db
--- /dev/null
+++ b/changelogs/unreleased/user-deactivation-minimum-days-extend.yml
@@ -0,0 +1,5 @@
+---
+title: Increased deactivation threshold to 180 days
+merge_request: 18902
+author:
+type: changed
diff --git a/doc/api/users.md b/doc/api/users.md
index 33b6efa7a02..f95ad7b62ba 100644
--- a/doc/api/users.md
+++ b/doc/api/users.md
@@ -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
diff --git a/doc/user/profile/account/delete_account.md b/doc/user/profile/account/delete_account.md
index 65896bd19cd..be761ca7558 100644
--- a/doc/user/profile/account/delete_account.md
+++ b/doc/user/profile/account/delete_account.md
@@ -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
diff --git a/spec/controllers/admin/users_controller_spec.rb b/spec/controllers/admin/users_controller_spec.rb
index 1d1653e67e3..afe21c8b34a 100644
--- a/spec/controllers/admin/users_controller_spec.rb
+++ b/spec/controllers/admin/users_controller_spec.rb
@@ -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