diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-30 15:16:56 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-10-30 15:16:56 +0000 |
commit | fa2fec1d18330e4cd9803ff164db19e7367e3838 (patch) | |
tree | 91a9bf1c74eeff29690f33e3faf2b8ca87051af3 /app/services | |
parent | 8ee0746f54c19fcb8fe81058594aa8d373c5b7d7 (diff) | |
download | gitlab-ce-fa2fec1d18330e4cd9803ff164db19e7367e3838.tar.gz |
Add latest changes from gitlab-org/security/gitlab@13-5-stable-ee
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/transfer_service.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index 013861631a1..5743efab81b 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -79,11 +79,7 @@ module Projects # Directories on disk move_project_folders(project) - # Move missing group labels to project - Labels::TransferService.new(current_user, @old_group, project).execute - - # Move missing group milestones - Milestones::TransferService.new(current_user, @old_group, project).execute + transfer_missing_group_resources(@old_group) # Move uploads move_project_uploads(project) @@ -107,6 +103,12 @@ module Projects refresh_permissions end + def transfer_missing_group_resources(group) + Labels::TransferService.new(current_user, group, project).execute + + Milestones::TransferService.new(current_user, group, project).execute + end + def allowed_transfer?(current_user, project) @new_namespace && can?(current_user, :change_namespace, project) && |