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) |
How to set up and validate locally
Behavior stays unchanged:
- Go to Security and Compliance -> Policies, create a new policy
- No delete button is visible
- Click "Configure with a merge request" and "Merge"
- Click on the newly created policy and edit
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #339753 (closed)
Edited by Martin Čavoj