Commit dffeff55 authored by GitLab Bot's avatar GitLab Bot

Add latest changes from gitlab-org/gitlab@master

parent d5e04160
...@@ -59,7 +59,7 @@ class User < ApplicationRecord ...@@ -59,7 +59,7 @@ class User < ApplicationRecord
# Removed in GitLab 12.3. Keep until after 2019-09-22. # Removed in GitLab 12.3. Keep until after 2019-09-22.
self.ignored_columns += %i[support_bot] self.ignored_columns += %i[support_bot]
MINIMUM_INACTIVE_DAYS = 14 MINIMUM_INACTIVE_DAYS = 180
# Override Devise::Models::Trackable#update_tracked_fields! # Override Devise::Models::Trackable#update_tracked_fields!
# to limit database writes to at most once every hour # to limit database writes to at most once every hour
......
---
title: Increased deactivation threshold to 180 days
merge_request: 18902
author:
type: changed
...@@ -1172,7 +1172,7 @@ Returns: ...@@ -1172,7 +1172,7 @@ Returns:
- `404 User Not Found` if user cannot be found. - `404 User Not Found` if user cannot be found.
- `403 Forbidden` when trying to deactivate a user: - `403 Forbidden` when trying to deactivate a user:
- Blocked by admin or by LDAP synchronization. - 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 ## Activate user
......
...@@ -71,7 +71,7 @@ To do this: ...@@ -71,7 +71,7 @@ To do this:
Please note that for the deactivation option to be visible to an admin, the user: Please note that for the deactivation option to be visible to an admin, the user:
- Must be currently active. - 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 ### Activating a user
......
...@@ -123,7 +123,7 @@ describe Admin::UsersController do ...@@ -123,7 +123,7 @@ describe Admin::UsersController do
put :deactivate, params: { id: user.username } put :deactivate, params: { id: user.username }
user.reload user.reload
expect(user.deactivated?).to be_falsey 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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment