summaryrefslogtreecommitdiff
path: root/app/helpers/user_callouts_helper.rb
diff options
context:
space:
mode:
authorMike Greiling <mike@pixelcog.com>2018-09-06 20:41:12 +0000
committerClement Ho <clemmakesapps@gmail.com>2018-09-06 20:41:12 +0000
commit160b26df743e84b2e34f98f36ab2efc042dd9da6 (patch)
tree77a2e46b99a89117331c7b52fd358d98b3375b19 /app/helpers/user_callouts_helper.rb
parent051007498d553d16172120b2ab7a79d0f244545c (diff)
downloadgitlab-ce-160b26df743e84b2e34f98f36ab2efc042dd9da6.tar.gz
Resolve "Clean up the top section of the cluster page"
Diffstat (limited to 'app/helpers/user_callouts_helper.rb')
-rw-r--r--app/helpers/user_callouts_helper.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/helpers/user_callouts_helper.rb b/app/helpers/user_callouts_helper.rb
index da5fe25c07d..657a3227dd4 100644
--- a/app/helpers/user_callouts_helper.rb
+++ b/app/helpers/user_callouts_helper.rb
@@ -1,6 +1,7 @@
module UserCalloutsHelper
GKE_CLUSTER_INTEGRATION = 'gke_cluster_integration'.freeze
GCP_SIGNUP_OFFER = 'gcp_signup_offer'.freeze
+ CLUSTER_SECURITY_WARNING = 'cluster_security_warning'.freeze
def show_gke_cluster_integration_callout?(project)
can?(current_user, :create_cluster, project) &&
@@ -11,6 +12,10 @@ module UserCalloutsHelper
!user_dismissed?(GCP_SIGNUP_OFFER)
end
+ def show_cluster_security_warning?
+ !user_dismissed?(CLUSTER_SECURITY_WARNING)
+ end
+
private
def user_dismissed?(feature_name)