Skip to content

Update policy drawer for role_approvers

What does this MR do and why?

Describe in detail what your merge request does and why.

Update policy drawer for role_approvers

  • add role_approvers as allowed value
  • update scan result policy drawer
  • update test

Changelog: added

EE: true

Screenshots or screen recordings

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

Policy Screenshot
roles only Screenshot_2023-03-22_at_12.21.15
mixed approvers Screenshot_2023-03-22_at_12.38.52

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. Navigate to a project => Security & Compliance => Policies => New policy => Scan Result Policy => yaml mode
  3. Paste in the yaml
type: scan_result_policy
name: Require role approvers
description: ''
enabled: true
rules:
  - type: license_finding
    branches: []
    match_on_inclusion: true
    license_types:
      - Academic Free License v1.1
      - Academic Free License v1.2
    license_states:
      - newly_detected
actions:
  - type: require_approval
    approvals_required: 1
    role_approvers:
      - owner
      - maintainer
  1. Merge and navigate to the project => Security & Compliance => Policies
  2. Select the policy
  3. Verify the drawer loads the correct summary

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 #377863 (closed)

Edited by Alexander Turinske

Merge request reports

Loading