Commit b94881d8 authored by Doug Stull's avatar Doug Stull Committed by Rémy Coutable

Revert privacy policy user callout

- Since we already have a terms of service that handles
  the privacy policy updates, this code can be removed.
parent 6bde3da4
......@@ -37,7 +37,6 @@ import GlFieldErrors from './gl_field_errors';
import initUserPopovers from './user_popovers';
import { initUserTracking } from './tracking';
import { __ } from './locale';
import initPrivacyPolicyUpdateCallout from './privacy_policy_update_callout';
import 'ee_else_ce/main_ee';
......@@ -97,7 +96,6 @@ function deferredInitialisation() {
initUsagePingConsent();
initUserPopovers();
initUserTracking();
initPrivacyPolicyUpdateCallout();
if (document.querySelector('.search')) initSearchAutocomplete();
......
import PersistentUserCallout from '~/persistent_user_callout';
function initPrivacyPolicyUpdateCallout() {
const callout = document.querySelector('.js-privacy-policy-update');
PersistentUserCallout.factory(callout);
}
export default initPrivacyPolicyUpdateCallout;
......@@ -17,6 +17,4 @@
%div{ class: "#{(container_class unless @no_container)} #{@content_class}" }
.content{ id: "content-body" }
= render "layouts/flash", extra_flash_class: 'limit-container-width'
- if Gitlab.com?
= render_if_exists "layouts/privacy_policy_update_callout"
= yield
......@@ -6,9 +6,6 @@ module EE
extend ::Gitlab::Utils::Override
prepended do
before_action do
push_frontend_feature_flag(:privacy_policy_update_callout)
end
around_action :set_current_ip_address
end
......
......@@ -9,9 +9,6 @@ module EE
CANARY_DEPLOYMENT = 'canary_deployment'
GOLD_TRIAL = 'gold_trial'
GOLD_TRIAL_BILLINGS = 'gold_trial_billings'
# Privacy Policy Update: https://gitlab.com/gitlab-org/gitlab/issues/13665
LATEST_PRIVACY_POLICY_UPDATE = '13665'
PRIVACY_POLICY_UPDATE = "privacy_policy_update_#{LATEST_PRIVACY_POLICY_UPDATE}"
def show_canary_deployment_callout?(project)
!user_dismissed?(CANARY_DEPLOYMENT) &&
......@@ -65,10 +62,6 @@ module EE
render 'shared/gold_trial_callout_content', is_dismissable: !namespace.free_plan?, callout: GOLD_TRIAL_BILLINGS
end
def show_privacy_policy_update?
::Feature.enabled?(:privacy_policy_update_callout) && !user_dismissed?(PRIVACY_POLICY_UPDATE)
end
private
def hashed_storage_enabled?
......
......@@ -14,8 +14,7 @@ module EE
geo_enable_hashed_storage: 5,
geo_migrate_hashed_storage: 6,
canary_deployment: 7,
gold_trial_billings: 8,
privacy_policy_update_13665: 10 # Privacy Policy Update: https://gitlab.com/gitlab-org/gitlab/issues/13665
gold_trial_billings: 8
)
end
end
......
- privacy_policy_link = link_to('https://about.gitlab.com/privacy', 'https://about.gitlab.com/privacy', class: 'deferred-link', target: '_blank', rel: 'noopener noreferrer')
- if show_privacy_policy_update?
%div{ class:"#{(container_class unless fluid_layout)} #{@content_class}" }
.bs-callout.js-privacy-policy-update.alert.alert-block.alert-dismissable.prepend-top-default.append-bottom-default{ role: 'alert', data: { feature_id: UserCalloutsHelper::PRIVACY_POLICY_UPDATE, dismiss_endpoint: user_callouts_path, defer_links: "true" } }
%button.close.js-close{ type: "button" }
= sprite_icon("close", size: 16)
%p= _('Our Privacy Policy has changed, please visit %{privacy_policy_link} to review these changes.').html_safe % { privacy_policy_link: privacy_policy_link }
---
title: Revert notification for updated privacy policy
merge_request: 18900
author:
type: change
......@@ -170,41 +170,6 @@ describe EE::UserCalloutsHelper do
end
end
describe '.show_privacy_policy_update?' do
subject { helper.show_privacy_policy_update? }
context 'when feature `privacy_policy_update_callout` is disabled' do
before do
Feature.get(:privacy_policy_update_callout).disable
allow(helper).to receive(:user_dismissed?).and_return(true)
end
it { is_expected.to be false }
end
context 'when feature `privacy_policy_update_callout` is enabled' do
before do
Feature.get(:privacy_policy_update_callout).enable
end
context 'when user has not dismissed' do
before do
allow(helper).to receive(:user_dismissed?).and_return(false)
end
it { is_expected.to be true }
end
context 'when user dismissed' do
before do
allow(helper).to receive(:user_dismissed?).and_return(true)
end
it { is_expected.to be false }
end
end
end
describe '#render_dashboard_gold_trial' do
using RSpec::Parameterized::TableSyntax
......
......@@ -11522,9 +11522,6 @@ msgstr ""
msgid "Other visibility settings have been disabled by the administrator."
msgstr ""
msgid "Our Privacy Policy has changed, please visit %{privacy_policy_link} to review these changes."
msgstr ""
msgid "Outbound requests"
msgstr ""
......
......@@ -96,30 +96,14 @@ describe ApplicationController do
request.path = '/-/peek'
end
# TODO:
# remove line below once `privacy_policy_update_callout`
# feature flag is removed and `gon` reverts back to
# to not setting any variables.
if Gitlab.ee?
it_behaves_like 'setting gon variables'
else
it_behaves_like 'not setting gon variables'
end
it_behaves_like 'not setting gon variables'
end
end
context 'with json format' do
let(:format) { :json }
# TODO:
# remove line below once `privacy_policy_update_callout`
# feature flag is removed and `gon` reverts back to
# to not setting any variables.
if Gitlab.ee?
it_behaves_like 'setting gon variables'
else
it_behaves_like 'not setting gon variables'
end
it_behaves_like 'not setting gon variables'
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