Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/group_clusters.rb')
-rw-r--r--lib/api/group_clusters.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/api/group_clusters.rb b/lib/api/group_clusters.rb
index 81944a653c8..a5a60ce8741 100644
--- a/lib/api/group_clusters.rb
+++ b/lib/api/group_clusters.rb
@@ -4,7 +4,10 @@ module API
class GroupClusters < ::API::Base
include PaginationParams
- before { authenticate! }
+ before do
+ authenticate!
+ ensure_feature_enabled!
+ end
feature_category :kubernetes_management
@@ -133,6 +136,10 @@ module API
def update_cluster_params
declared_params(include_missing: false).without(:cluster_id)
end
+
+ def ensure_feature_enabled!
+ not_found! unless Feature.enabled?(:certificate_based_clusters, user_group, default_enabled: :yaml, type: :ops)
+ end
end
end
end