summaryrefslogtreecommitdiff
path: root/app/controllers/projects/feature_flags_controller.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-16 18:25:58 +0000
commita5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch)
treefb69158581673816a8cd895f9d352dcb3c678b1e /app/controllers/projects/feature_flags_controller.rb
parentd16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff)
downloadgitlab-ce-14.0.0-rc42.tar.gz
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/controllers/projects/feature_flags_controller.rb')
-rw-r--r--app/controllers/projects/feature_flags_controller.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/controllers/projects/feature_flags_controller.rb b/app/controllers/projects/feature_flags_controller.rb
index 6b6606c4f41..a59824b1085 100644
--- a/app/controllers/projects/feature_flags_controller.rb
+++ b/app/controllers/projects/feature_flags_controller.rb
@@ -11,6 +11,7 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
before_action :feature_flag, only: [:edit, :update, :destroy]
before_action :ensure_flag_writable!, only: [:update]
+ before_action :exclude_legacy_flags_check, only: [:edit]
before_action do
push_frontend_feature_flag(:feature_flag_permissions)
@@ -107,6 +108,12 @@ class Projects::FeatureFlagsController < Projects::ApplicationController
end
end
+ def exclude_legacy_flags_check
+ if feature_flag.legacy_flag?
+ not_found
+ end
+ end
+
def create_params
params.require(:operations_feature_flag)
.permit(:name, :description, :active, :version,