Prevent unscoped policies from appearing

What does this MR do and why?

Prevent unscoped policies from appearing

Changelog: changed

EE: true

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

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.

Before After
image image

How to set up and validate locally

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

  1. Go to a top level group.
  2. Create a subgroup Alpha.
  3. Create another subgroup under Alpha named Bravo.
  4. Create two dummy projects under Bravo group. Ideally you should have something like this.
Top level group
|- Alpha
  |- Bravo
    |- project_01
    |- project_02
  1. Create a Scan Execution Policy under group Alpha and limit the scope to project_01.
  2. Go to project_02 => Secure => Policies
  3. Verify the new policy does not exist in the list
  4. Go to project_01 => Secure => Policies
  5. Verify the new policy does exist in the list
  6. Verify for each project type

Related to #501160 (closed)

Edited by Alexander Turinske

Merge request reports

Loading