Reset selected exceptions projects

What does this MR do and why?

Reset selected exceptions projects

When exception type is changed to without exceptions, it will reset projects array to an empty array

This merge request introduces a new feature to reset selected projects in the scope project selector component. When the user selects the "Without Exceptions" option, the component now emits an event to clear the list of excluded projects. The changes also include corresponding test cases to verify this new functionality. Overall, these updates enhance the flexibility of the project selection process in the security orchestration policy editor.

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.

Description UI
Reset projects for policy scope excluding projects reset.mov

How to set up and validate locally

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

  1. Create a scan execution policy in a group/subgroup (I created a default secret detection policy)
  2. Change without exceptions to except projects and select a project to exclude from the policy, notice the YAML updates exluding this project
  3. Save the scan execution policy
  4. Edit the same scan execution policy
  5. Change except project to without exceptions, notice the YAML does not update and the project remains excluded
  6. Save the scan execution policy changes
  7. Edit the same scan execution policy again
  8. Notice that the change to without exceptions is not reflected in the UI and the YAML

Related to #521720 (closed)

Merge request reports

Loading