Add group policy scope on project level

What does this MR do and why?

  1. Add policy group scope on project level
  2. It is only available for Security Policy Project with linked projects and groups

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Description UI
Group policy on SPP Screen Recording 2024-09-12 at 16.26.06.mov

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Enable feature flag:
echo "Feature.enable(:policy_group_scope_project)" | rails c
  1. Go to a project (Security Policy project)
  2. Make sure this project is linked to more then 1 group or project as SPP.
  3. If not go to Secure -> Policies -> Edit policy Project -> Link project to groups/projects
  4. Go to project -> Secure -> Policies -> New policy -> any type -> Select all projects in linked groups
  5. Edit policy scope with new option

Related to #488378 (closed)

Merge request reports

Loading