Add a list of selected exceptions for bypassing

What does this MR do and why?

Add a list of selected exceptions

List of selected exceptions would render all allowed exception options

References

Screenshots or screen recordings

Description UI
List of selected exceptions selected list.mov

How to set up and validate locally

  1. Enable feature flag:

    Feature.enable(:security_policies_bypass_options)
  2. Secure -> Policies

  3. New merge request approval policy

  4. Open Advanced settings

  5. Click add exception button

  6. Select branch pattern option

  7. Go to yaml mode

Add to the end of yaml:

bypass_settings:
  invalid:
    - 'key'
    - 'key1'
  roles:
    - 'maintainer'
    - 'developer'
  tokens: 
    - name: 'token'
    - name: 'token2'  
  accounts:
  - id: 136
    reason_required: true
  groups:
  - id: 36
    reason_required: true
  branches:
    - source:
        pattern: test
      target:
        name: test
    - source:
        pattern: test1
      target:
        name: testq  

MR acceptance checklist

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

Related to #540827 (closed)

Merge request reports

Loading