Commit f62f3979 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'xanf-recovery-settings-only-for-gitlab-com' into 'master'

Remove "Please ensure your account's recovery settings are up to date." message at self-managed instances"

See merge request gitlab-org/gitlab!29672
parents 74df7c80 3c3794f9
......@@ -61,6 +61,7 @@ module EE
def render_account_recovery_regular_check
return unless current_user &&
::Gitlab.com? &&
3.months.ago > current_user.created_at &&
!user_dismissed?(ACCOUNT_RECOVERY_REGULAR_CHECK, 3.months.ago)
......
---
title: Restrict prompt to check user account settings only to Gitlab.com
merge_request: 29672
author:
type: changed
......@@ -8,6 +8,7 @@ describe 'Account recovery regular check callout' do
let(:message) { "Please ensure your account's recovery settings are up to date." }
before do
allow(Gitlab).to receive(:com?) { true }
gitlab_sign_in(user)
end
......
......@@ -295,18 +295,22 @@ describe EE::UserCalloutsHelper do
let(:old_user) { create(:user, created_at: 4.months.ago )}
let(:anonymous) { nil }
where(:kind_of_user, :dismissed_callout?, :should_render?) do
:anonymous | false | false
:new_user | false | false
:old_user | false | true
:old_user | true | false
where(:kind_of_user, :is_gitlab_com?, :dismissed_callout?, :should_render?) do
:anonymous | false | false | false
:anonymous | true | false | false
:new_user | false | false | false
:new_user | true | false | false
:old_user | false | false | false
:old_user | true | false | true
:old_user | false | true | false
:old_user | true | true | false
end
with_them do
before do
user = send(kind_of_user)
allow(helper).to receive(:current_user).and_return(user)
allow(Gitlab).to receive(:com?).and_return(is_gitlab_com?)
allow(user).to receive(:dismissed_callout?).and_return(dismissed_callout?) if user
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