diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-08-20 21:42:06 +0300 |
commit | 6e4e1050d9dba2b7b2523fdd1768823ab85feef4 (patch) | |
tree | 78be5963ec075d80116a932011d695dd33910b4e /app/helpers/user_callouts_helper.rb | |
parent | 1ce776de4ae122aba3f349c02c17cebeaa8ecf07 (diff) |
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'app/helpers/user_callouts_helper.rb')
-rw-r--r-- | app/helpers/user_callouts_helper.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/helpers/user_callouts_helper.rb b/app/helpers/user_callouts_helper.rb index 34c8ce51df0..98159369fb1 100644 --- a/app/helpers/user_callouts_helper.rb +++ b/app/helpers/user_callouts_helper.rb @@ -7,13 +7,15 @@ module UserCalloutsHelper SUGGEST_POPOVER_DISMISSED = 'suggest_popover_dismissed' TABS_POSITION_HIGHLIGHT = 'tabs_position_highlight' WEBHOOKS_MOVED = 'webhooks_moved' + CUSTOMIZE_HOMEPAGE = 'customize_homepage' def show_admin_integrations_moved? !user_dismissed?(ADMIN_INTEGRATIONS_MOVED) end def show_gke_cluster_integration_callout?(project) - can?(current_user, :create_cluster, project) && + active_nav_link?(controller: sidebar_operations_paths) && + can?(current_user, :create_cluster, project) && !user_dismissed?(GKE_CLUSTER_INTEGRATION) end @@ -35,14 +37,14 @@ module UserCalloutsHelper !user_dismissed?(SUGGEST_POPOVER_DISMISSED) end - def show_tabs_feature_highlight? - current_user && !user_dismissed?(TABS_POSITION_HIGHLIGHT) && !Rails.env.test? - end - def show_webhooks_moved_alert? !user_dismissed?(WEBHOOKS_MOVED) end + def show_customize_homepage_banner?(customize_homepage) + customize_homepage && !user_dismissed?(CUSTOMIZE_HOMEPAGE) + end + private def user_dismissed?(feature_name, ignore_dismissal_earlier_than = nil) |