Skip to content

Groups scope dropdown loads only linked to SPP groups

Artur Fedorov requested to merge 480637-policies-group-scope-filtered-list into master

What does this MR do and why?

  1. Extract common logic to base_items_dropdown.vue
  2. Update group_projects_dropdown.vue to use new base dropdown
  3. Create new linked_items_dropdown.vue for loading linked to SPP namespaces and projects
  4. Created tests for new components
  5. Updated existing tests

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
Select only linked to SPP groups Screen Recording 2024-08-28 at 00.22.18.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)" | rails c
  2. Go to a group

  3. Secure -> Policies

  4. New policy => any type

  5. Make sure there is an option all projects in linked groups

  6. If dropdown is empty, link some groups to same SPP as selected policy

  7. Make sure dropdown, contains linked groups

Related to #480637

Edited by Artur Fedorov

Merge request reports