diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-05 15:46:41 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-12-05 15:46:41 +0000 |
commit | 13b1508c3ed9887d9fcffdad66cbcf90b14eabd9 (patch) | |
tree | fb5c76469015186badbbb1af0c6375c4e4de2df4 /app/controllers | |
parent | 2ea6900882edb151bfb2ee4ef9733a9fc7b521f6 (diff) | |
parent | e3188eb13e3145e9bd4b123c304e43b18eeb1154 (diff) | |
download | gitlab-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.rb | 8 |
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 |