Security approvals are duplicated in `Repository Settings > Branch Rules > Details`
Summary
Settings > Merge Requests
Settings > Repository Settings > Branch Rules > Details
Steps to reproduce
- Create a subgroup with multiple projects
- Create policies with rules that are enforced at the sub-group level
- View a project's settings as shown above
Example Project
https://gitlab.com/haven-group/development-projects/project-a
What is the current bug behavior?
What is the expected correct behavior?
Relevant logs and/or screenshots
Output of checks
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:env:info\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\`)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: \`sudo gitlab-rake gitlab:check SANITIZE=true\`) (For installations from source run and paste the output of: \`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\`) (we will only investigate if the tests are passing)
Possible fixes
- 
backend Update Projects::AllBranchesRule#approval_project_rulesandProjects::AllProtectedBranchesRule#approval_project_rulesto group project_approval_rules bysecurity_orchestration_policy_configuration_idandorchestration_policy_idx
def approval_project_rules
  project
    .approval_rules
    .for_all_branches
    .group_by { |rule| [rule.security_orchestration_policy_configuration_id, rule.orchestration_policy_idx] }
    .map(&:first)
endEdited  by Sashi Kumar Kumaresan

