From 17ef30f3df6d3939e41e69efc7cfa3deaa08605d Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Thu, 5 May 2022 09:08:00 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/helpers/application_settings_helper.rb | 2 +- app/helpers/clusters_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'app/helpers') diff --git a/app/helpers/application_settings_helper.rb b/app/helpers/application_settings_helper.rb index dbdfa0c1eab..aa0e8c55470 100644 --- a/app/helpers/application_settings_helper.rb +++ b/app/helpers/application_settings_helper.rb @@ -462,7 +462,7 @@ module ApplicationSettingsHelper def instance_clusters_enabled? clusterable = Clusters::Instance.new - Feature.enabled?(:certificate_based_clusters, default_enabled: :yaml, type: :ops) && + clusterable.certificate_based_clusters_enabled? && can?(current_user, :read_cluster, clusterable) end diff --git a/app/helpers/clusters_helper.rb b/app/helpers/clusters_helper.rb index 116ff284c16..6a721f600f5 100644 --- a/app/helpers/clusters_helper.rb +++ b/app/helpers/clusters_helper.rb @@ -23,7 +23,7 @@ module ClustersHelper can_add_cluster: clusterable.can_add_cluster?.to_s, can_admin_cluster: clusterable.can_admin_cluster?.to_s, display_cluster_agents: display_cluster_agents?(clusterable).to_s, - certificate_based_clusters_enabled: Feature.enabled?(:certificate_based_clusters, clusterable.clusterable_namespace, default_enabled: :yaml, type: :ops).to_s, + certificate_based_clusters_enabled: clusterable.certificate_based_clusters_enabled?.to_s, default_branch_name: default_branch_name(clusterable), project_path: clusterable_project_path(clusterable), kas_address: Gitlab::Kas.external_url, -- cgit v1.2.1