diff options
Diffstat (limited to 'app/helpers/users/callouts_helper.rb')
-rw-r--r-- | app/helpers/users/callouts_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/helpers/users/callouts_helper.rb b/app/helpers/users/callouts_helper.rb index af3ac495164..0f4cbd6642b 100644 --- a/app/helpers/users/callouts_helper.rb +++ b/app/helpers/users/callouts_helper.rb @@ -16,6 +16,7 @@ module Users WEB_HOOK_DISABLED = 'web_hook_disabled' ULTIMATE_FEATURE_REMOVAL_BANNER = 'ultimate_feature_removal_banner' BRANCH_RULES_INFO_CALLOUT = 'branch_rules_info_callout' + NEW_NAVIGATION_CALLOUT = 'new_navigation_callout' def show_gke_cluster_integration_callout?(project) active_nav_link?(controller: sidebar_operations_paths) && @@ -79,6 +80,18 @@ module Users !user_dismissed?(BRANCH_RULES_INFO_CALLOUT) end + def show_new_navigation_callout? + show_super_sidebar? && + !user_dismissed?(NEW_NAVIGATION_CALLOUT) && + # GitLab.com users created after the feature flag's full rollout (June 2nd 2023) don't need to see the callout. + # Remove the gitlab_com_user_created_after_new_nav_rollout? method when the callout isn't needed anymore. + !gitlab_com_user_created_after_new_nav_rollout? + end + + def gitlab_com_user_created_after_new_nav_rollout? + Gitlab.com? && current_user.created_at >= Date.new(2023, 6, 2) + end + def ultimate_feature_removal_banner_dismissed?(project) return false unless project |