Redirect `threat_monitoring/policies` routes to `policies_controller` routes and delete associated actions
Summary
- with the removal of the
:security_orchestration_policies_configurationfeature flag, the/-/threat_monitoring/policies/newand/-/threat_monitoring/policies/editroutes are no longer used and should be removed
Improvements
-
backend redirect the policiesendpoints in at https://gitlab.com/gitlab-org/gitlab/blob/master/ee/config/routes/project.rb#L44 to the thepoliciesendpoints at https://gitlab.com/gitlab-org/gitlab/blob/master/ee/config/routes/project.rb#L62 and- update/delete any associated code and tests
-
backend remove the threat_monitoring#editandthreat_monitoring#newactions and any associated templates and tests
Risks
If done before the feature flag is removed, it will prevent us from rolling the feature flag back in the event of an issue
Involved components
Modify the following files
- https://gitlab.com/gitlab-org/gitlab/blob/master/ee/config/routes/project.rb#L44
- https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/controllers/projects/threat_monitoring_controller.rb#L21
-
https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/helpers/policy_helper.rb#L4 (delete
policy_detailshelper as it is no longer used)
Delete the following files
- https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/views/projects/threat_monitoring/edit.html.haml
- https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/views/projects/threat_monitoring/new.html.haml
- https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/assets/javascripts/pages/projects/threat_monitoring/edit/index.js
- https://gitlab.com/gitlab-org/gitlab/blob/master/ee/app/assets/javascripts/pages/projects/threat_monitoring/new/index.js
Edited by Alexander Turinske