Redirect `threat_monitoring/policies` routes to `policies_controller` routes and delete associated actions
Summary
- with the removal of the
:security_orchestration_policies_configuration
feature flag, the/-/threat_monitoring/policies/new
and/-/threat_monitoring/policies/edit
routes are no longer used and should be removed
Improvements
-
backend redirect the policies
endpoints in at https://gitlab.com/gitlab-org/gitlab/blob/master/ee/config/routes/project.rb#L44 to the thepolicies
endpoints 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#edit
andthreat_monitoring#new
actions 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_details
helper 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