Extract feature name into constant

This commit is contained in:
Matija Čupić 2018-01-30 15:30:49 +01:00
parent f2253d48a1
commit 4157cad23b
No known key found for this signature in database
GPG Key ID: 4BAF84FFACD2E5DE
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,8 @@
module CalloutsHelper
def show_gke_cluster_integration_callout?(kube_feature_name, project)
current_user && !user_dismissed?(kube_feature_name) &&
GKE_CLUSTER_INTEGRATION = 'gke_cluster_integration'.freeze
def show_gke_cluster_integration_callout?(project)
current_user && !user_dismissed?(GKE_CLUSTER_INTEGRATION) &&
(project.team.master?(current_user) ||
current_user == project.owner)
end