diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-11-05 19:05:10 +0100 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-11-08 23:26:04 +1300 |
commit | 675bfd50a9483bfefea6a374c9d9024331a5c970 (patch) | |
tree | 27a0cae052b2f3de1dc461cf1f04d5ac717ac87b /app/controllers/groups | |
parent | a90320f792f9faefa3d5198e17b94f3acec7c6a5 (diff) | |
download | gitlab-ce-675bfd50a9483bfefea6a374c9d9024331a5c970.tar.gz |
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/groups')
-rw-r--r-- | app/controllers/groups/clusters_controller.rb | 5 |
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 |