Skip to content

Fix pull/push mirror authentication fields

Jacques Erasmus requested to merge 353433-fix-mirror-auth-fields into master

What does this MR do and why?

This fixes the pull/push mirror authentication fields that were not showing.

The issue was related to a toggle on the page that was being initialized but not present on the page at the time of initialization.

The fact that the toggles were not present at the time of initialization is due to the HTML not being available in the DOM at the time of initialization (likely license-related or a timing issue).

To prevent it from happening again I've added a null-safe check around the initialization of the toggles.

Screenshots or screen recordings

before after
Screenshot_2022-02-23_at_15.33.38 Screenshot_2022-02-23_at_15.35.44

How to set up and validate locally

  1. Create a GitLab instance with the Bronze tier

  2. Navigate to {project} > settings > repository > Mirroring repositories

  3. Notice the Authentication fields are not missing

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

Edited by Jacques Erasmus

Merge request reports