summaryrefslogtreecommitdiff
path: root/app/controllers/groups
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/groups')
-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