• Stan Hu's avatar
    Fix overwrite check in GitLab import/export · 8e53ce74
    Stan Hu authored
    In https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/17883, we
    added a feature that would allow a project export to be uploaded and
    imported successfully before deleting the old copy of the project.
    
    This overwrite feature would always check whether the user had owner
    privileges in the group of the project. If the user only had maintainer
    privileges or less--even if an overwrite was not happening--the
    import/export would fail with an empty `Projects::ImportService::Error`.
    
    To fix this, we make two changes:
    
    1. Only do the permission check if we actually need to overwrite
    the project.
    2. If the permission check fails, raise an exception with details.
    8e53ce74
sh-fix-overwrite-import-export-check.yml 96 Bytes