summaryrefslogtreecommitdiff
path: root/app/controllers/projects/feature_flags_controller.rb
diff options
context:
space:
mode:
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,