Skip to content

Fix incorrect confirmation modal prompt when updating project settings

What does this MR do and why?

Fixes the broken behaviour in #350347 (closed) by ensuring we only prompt the user's to confirm reducing a projects visibility settings if the visibility field is changed.

  • Moves the submit button from haml to vue
  • Adds a condition to check if the project visibility has been lowered
  • Updates related tests

This was first introduced in !76417 (merged) and seems to only affect projects that have existing forks.

Screenshots or screen recordings

No confirmation needed Confirmation needed
no-visibility-change confirmation-required

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Testing the modal

  1. Create a project with public visibility
  2. Login as another user and fork the project
  3. Return to your initial user
  4. Navigate to project settings <gdk>/<project-path>/edit
  5. Expand "Visibility, project features, permissions"
  6. Change the project visibility to private
  7. Click save
  8. You will be prompted to confirm the change to visibility

Testing the bug fix

  1. Create a project with public visibility
  2. Login as another user and fork the project
  3. Return to your initial user
  4. Navigate to project settings <gdk>/<project-path>/edit
  5. Expand "Visibility, project features, permissions"
  6. Change any other field in this section
  7. Click save
  8. No prompt

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

Edited by Ezekiel Kigbo

Merge request reports

Loading