Skip to content

Refactor isEditing for Policy Editor

What does this MR do and why?

This MR simplifies isEditing method and adds a test for it.

Screenshots or screen recordings

New policy Edit policy
New policy remains unchanged (no delete button) Editing remains unchanged (delete button visible)
CleanShot_2023-04-03_at_17.25.44_2x CleanShot_2023-04-03_at_17.27.50_2x

How to set up and validate locally

Behavior stays unchanged:

  1. Go to Security and Compliance -> Policies, create a new policy
  2. No delete button is visible
  3. Click "Configure with a merge request" and "Merge"
  4. Click on the newly created policy and edit
  5. Delete button is visible next to "Configure with a merge request"

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

Edited by Martin Čavoj

Merge request reports