summaryrefslogtreecommitdiff
path: root/app/helpers/user_callouts_helper.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 23:50:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 23:50:22 +0000
commit9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch)
tree70467ae3692a0e35e5ea56bcb803eb512a10bedb /app/helpers/user_callouts_helper.rb
parent4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff)
downloadgitlab-ce-9dc93a4519d9d5d7be48ff274127136236a3adb3.tar.gz
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'app/helpers/user_callouts_helper.rb')
-rw-r--r--app/helpers/user_callouts_helper.rb13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/helpers/user_callouts_helper.rb b/app/helpers/user_callouts_helper.rb
index 6a242d000ae..7a90984cd77 100644
--- a/app/helpers/user_callouts_helper.rb
+++ b/app/helpers/user_callouts_helper.rb
@@ -5,7 +5,7 @@ module UserCalloutsHelper
GKE_CLUSTER_INTEGRATION = 'gke_cluster_integration'
GCP_SIGNUP_OFFER = 'gcp_signup_offer'
SUGGEST_POPOVER_DISMISSED = 'suggest_popover_dismissed'
- SERVICE_TEMPLATES_DEPRECATED = 'service_templates_deprecated'
+ SERVICE_TEMPLATES_DEPRECATED_CALLOUT = 'service_templates_deprecated_callout'
TABS_POSITION_HIGHLIGHT = 'tabs_position_highlight'
WEBHOOKS_MOVED = 'webhooks_moved'
CUSTOMIZE_HOMEPAGE = 'customize_homepage'
@@ -41,16 +41,19 @@ module UserCalloutsHelper
!user_dismissed?(SUGGEST_POPOVER_DISMISSED)
end
- def show_service_templates_deprecated?
- !user_dismissed?(SERVICE_TEMPLATES_DEPRECATED)
+ def show_service_templates_deprecated_callout?
+ !Gitlab.com? &&
+ current_user&.admin? &&
+ Service.for_template.active.exists? &&
+ !user_dismissed?(SERVICE_TEMPLATES_DEPRECATED_CALLOUT)
end
def show_webhooks_moved_alert?
!user_dismissed?(WEBHOOKS_MOVED)
end
- def show_customize_homepage_banner?(customize_homepage)
- customize_homepage && !user_dismissed?(CUSTOMIZE_HOMEPAGE)
+ def show_customize_homepage_banner?
+ !user_dismissed?(CUSTOMIZE_HOMEPAGE)
end
def show_feature_flags_new_version?