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
- Create a new group.
- Import a repository by URL with Mirror repository checked under the group.
- Mirroring should be configured if Mirror repository is checked.
Edited by Vasilii Iakliushin