Commit deb4bfa4 authored by Tiago Botelho's avatar Tiago Botelho

Backport relevant changes from EE https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4827 to CE

parent ce819ece
......@@ -85,6 +85,15 @@ class ProjectTeam
@masters ||= fetch_members(Gitlab::Access::MASTER)
end
def owners
@owners ||=
if group
group.owners
else
[project.owner]
end
end
def import(source_project, current_user = nil)
target_project = project
......
......@@ -49,6 +49,8 @@ module Users
::Projects::DestroyService.new(project, current_user, skip_repo: project.legacy_storage?).execute
end
yield(user) if block_given?
MigrateToGhostUserService.new(user).execute unless options[:hard_delete]
# Destroy the namespace after destroying the user since certain methods may depend on the namespace existing
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment