Skip to content

Fix the permission check for pull mirroring

What does this MR do and why?

Contributes to #418733 (closed)

Problem

admin_mirror permission check triggers during the project creation.

At this point of time, authorizations for the project are not set (in after_create_actions).

When user tries to import a project into a group with a pull mirroring option, then the permission check will fail and disable the mirror.

Solution

Apply admin_mirror check after the project was created. It allows us to correctly verify user permissions.

Steps to reproduce

  1. Create a new group.
  2. Import a repository by URL with Mirror repository checked under the group.

Screenshot_2023-07-17_at_12.40.27

  1. Mirroring should be configured if Mirror repository is checked.
Edited by Vasilii Iakliushin

Merge request reports

Loading