summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-12-05 15:46:41 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-12-05 15:46:41 +0000
commit13b1508c3ed9887d9fcffdad66cbcf90b14eabd9 (patch)
treefb5c76469015186badbbb1af0c6375c4e4de2df4 /app/controllers
parent2ea6900882edb151bfb2ee4ef9733a9fc7b521f6 (diff)
parente3188eb13e3145e9bd4b123c304e43b18eeb1154 (diff)
downloadgitlab-ce-13b1508c3ed9887d9fcffdad66cbcf90b14eabd9.tar.gz
Merge branch '34758-deployment-cluster' into 'master'
Use group clusters when deploying (DeploymentPlatform) See merge request gitlab-org/gitlab-ce!22308
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/groups/clusters_controller.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/controllers/groups/clusters_controller.rb b/app/controllers/groups/clusters_controller.rb
index 50c44b7a58b..b846fb21266 100644
--- a/app/controllers/groups/clusters_controller.rb
+++ b/app/controllers/groups/clusters_controller.rb
@@ -3,8 +3,8 @@
class Groups::ClustersController < Clusters::ClustersController
include ControllerWithCrossProjectAccessCheck
- prepend_before_action :check_group_clusters_feature_flag!
prepend_before_action :group
+ prepend_before_action :check_group_clusters_feature_flag!
requires_cross_project_access
layout 'group'
@@ -20,6 +20,10 @@ class Groups::ClustersController < Clusters::ClustersController
end
def check_group_clusters_feature_flag!
- render_404 unless Feature.enabled?(:group_clusters)
+ render_404 unless group_clusters_enabled?
+ end
+
+ def group_clusters_enabled?
+ group.group_clusters_enabled?
end
end