diff options
author | Rémy Coutable <remy@rymai.me> | 2016-04-14 15:13:08 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-04-14 15:13:08 +0000 |
commit | 4a514b27e96bfa6024e26b0a7500deec1d89391b (patch) | |
tree | 91367d6bcd0dab0b60333b8234e85296267bd5d6 /app/services | |
parent | 39f6cfcc3eb6d8c52e936a576ac4a8c9b15169fe (diff) | |
parent | a8ea2c18959c700913132d8a2d7ce3a211303c10 (diff) | |
download | gitlab-ce-4a514b27e96bfa6024e26b0a7500deec1d89391b.tar.gz |
Merge branch 'issue_15155' into 'master'
Setup visibility level for project when transfering for a group
fixes #15155
See merge request !3707
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/projects/transfer_service.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/services/projects/transfer_service.rb b/app/services/projects/transfer_service.rb index 2e734654466..79a27f4af7e 100644 --- a/app/services/projects/transfer_service.rb +++ b/app/services/projects/transfer_service.rb @@ -34,8 +34,9 @@ module Projects raise TransferError.new("Project with same path in target namespace already exists") end - # Apply new namespace id + # Apply new namespace id and visibility level project.namespace = new_namespace + project.visibility_level = new_namespace.visibility_level unless project.visibility_level_allowed_by_group? project.save! # Notifications @@ -56,7 +57,7 @@ module Projects Gitlab::UploadsTransfer.new.move_project(project.path, old_namespace.path, new_namespace.path) project.old_path_with_namespace = old_path - + SystemHooksService.new.execute_hooks_for(project, :transfer) true end |