summaryrefslogtreecommitdiff
path: root/app/helpers/users/callouts_helper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/helpers/users/callouts_helper.rb')
-rw-r--r--app/helpers/users/callouts_helper.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/helpers/users/callouts_helper.rb b/app/helpers/users/callouts_helper.rb
index 32b0d7b3fe3..87c8bf5cb28 100644
--- a/app/helpers/users/callouts_helper.rb
+++ b/app/helpers/users/callouts_helper.rb
@@ -10,6 +10,7 @@ module Users
REGISTRATION_ENABLED_CALLOUT = 'registration_enabled_callout'
UNFINISHED_TAG_CLEANUP_CALLOUT = 'unfinished_tag_cleanup_callout'
SECURITY_NEWSLETTER_CALLOUT = 'security_newsletter_callout'
+ REGISTRATION_ENABLED_CALLOUT_ALLOWED_CONTROLLER_PATHS = [/^root/, /^dashboard\S*/, /^admin\S*/].freeze
def show_gke_cluster_integration_callout?(project)
active_nav_link?(controller: sidebar_operations_paths) &&
@@ -47,7 +48,8 @@ module Users
!Gitlab.com? &&
current_user&.admin? &&
signup_enabled? &&
- !user_dismissed?(REGISTRATION_ENABLED_CALLOUT)
+ !user_dismissed?(REGISTRATION_ENABLED_CALLOUT) &&
+ REGISTRATION_ENABLED_CALLOUT_ALLOWED_CONTROLLER_PATHS.any? { |path| controller.controller_path.match?(path) }
end
def dismiss_two_factor_auth_recovery_settings_check