Skip to content

Allow for multiple approvers to be created

Alexander Turinske requested to merge 377865-add-multiple-actions into master

What does this MR do and why?

Describe in detail what your merge request does and why.

Allow for multiple approvers to be created

  • this work is behind a feature flag
  • add "add approver" button
  • only show "add approver" button on the last approver
  • track approver types so multiple approver selections of a single type are created because users and groups are multi-select
  • add "remove approver" button
  • only show "remove approver" button if there is more than one approver

Screenshots or screen recordings

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

NOTE: There are some UX issues with the GlListbox being used; they will be fixed in FE: Fix search-box-by-type input box in Gl-Form (#381649 - closed) and FE: Display selected users/groups (#382148 - closed)

Scenario Screenshot
Video walk through multiple_approvers video walkthrough

How to set up and validate locally

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

  1. Upload a GitLab Ultimate license
  2. Enable the scan_result_role_action feature flag: echo "Feature.enable(:scan_result_role_action)" | rails c
  3. Navigate to http://gdk.test:3443/groups/flightjs/-/security/policies/new?type=scan_result_policy
  4. Verify that multiple actions can be added

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #377865 (closed)

Edited by Alexander Turinske

Merge request reports