Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
d5e0416021
commit
dffeff5520
5 changed files with 9 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Increased deactivation threshold to 180 days
|
||||
merge_request: 18902
|
||||
author:
|
||||
type: changed
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue