-
- Downloads
Fix overwrite check in GitLab import/export
In gitlab-foss!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.
parent
bf44d054
No related branches found
No related tags found
Showing
- app/services/projects/import_service.rb 1 addition, 0 deletionsapp/services/projects/import_service.rb
- changelogs/unreleased/sh-fix-overwrite-import-export-check.yml 5 additions, 0 deletions...elogs/unreleased/sh-fix-overwrite-import-export-check.yml
- lib/gitlab/import_export/importer.rb 8 additions, 4 deletionslib/gitlab/import_export/importer.rb
- spec/lib/gitlab/import_export/importer_spec.rb 57 additions, 19 deletionsspec/lib/gitlab/import_export/importer_spec.rb
Please register or sign in to comment