Skip to content

Update role approvers on mode switch

Alexander Turinske requested to merge 395545-update-yaml-role into master

What does this MR do and why?

Update role approvers on mode switch Alexander Turinske authored 16 hours ago

  • fix bug where if a user changed the role approvers in yaml mode and switched to rule mode, the dropdown did not update
  • fix bug where if a user removed the role approvers in yaml mode and switched to rule mode, the dropdown did not update
  • fix bug where if a user changed the role approvers in yaml mode to a role that did not exists and switches to rule mode, the dropdown was not updated
  • update tests

Changelog: fixed

EE: true

Screenshots or screen recordings

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

Before After
role_approver_-_b roler_approver_-_a

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/group => Secure => Policies => New policy => Scan result policy
  3. Add role approver in rule mode
  4. Modify it in yaml mode to a role that exists
  5. Switch back to rule mode
  6. Verify it was updated
  7. Modify it in yaml mode to a role that does not exist
  8. Switch back to rule mode
  9. Verify it disabled rule mod

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

Edited by Alexander Turinske

Merge request reports