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:
authorMayra Cabrera <mcabrera@gitlab.com>2018-11-05 21:05:10 +0300
committerThong Kuah <tkuah@gitlab.com>2018-11-08 13:26:04 +0300
commit675bfd50a9483bfefea6a374c9d9024331a5c970 (patch)
tree27a0cae052b2f3de1dc461cf1f04d5ac717ac87b /app/controllers
parenta90320f792f9faefa3d5198e17b94f3acec7c6a5 (diff)
Adds feature flag for Group Clusters
As the frontend is still in progress and other related backend is still in prgress we need a feature flag to turn off Group Clusters.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/groups/clusters_controller.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/groups/clusters_controller.rb b/app/controllers/groups/clusters_controller.rb
index 92602fd8096..50c44b7a58b 100644
--- a/app/controllers/groups/clusters_controller.rb
+++ b/app/controllers/groups/clusters_controller.rb
@@ -3,6 +3,7 @@
class Groups::ClustersController < Clusters::ClustersController
include ControllerWithCrossProjectAccessCheck
+ prepend_before_action :check_group_clusters_feature_flag!
prepend_before_action :group
requires_cross_project_access
@@ -17,4 +18,8 @@ class Groups::ClustersController < Clusters::ClustersController
def group
@group ||= find_routable!(Group, params[:group_id] || params[:id])
end
+
+ def check_group_clusters_feature_flag!
+ render_404 unless Feature.enabled?(:group_clusters)
+ end
end