diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-03 14:57:12 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2015-06-03 14:57:12 +0200 |
commit | 1edff53444ea493ee010a83220cf13ccb381b411 (patch) | |
tree | 51f2f728dee26bd6107c520bb092ddfac84409d1 /app/services/delete_user_service.rb | |
parent | 61cfd1d2733a717934a723d36f60e7bcd09fad05 (diff) | |
download | gitlab-ce-1edff53444ea493ee010a83220cf13ccb381b411.tar.gz |
Remove projects before group/user. Remove namespace directory asyncfix-group-remove
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/services/delete_user_service.rb')
-rw-r--r-- | app/services/delete_user_service.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/services/delete_user_service.rb b/app/services/delete_user_service.rb index d259b4efca6..ca350eb2a8d 100644 --- a/app/services/delete_user_service.rb +++ b/app/services/delete_user_service.rb @@ -4,6 +4,11 @@ class DeleteUserService user.errors[:base] << 'You must transfer ownership or delete groups before you can remove user' user else + # TODO: Skip remove repository so Namespace#rm_dir works + user.personal_projects.each do |project| + ::Projects::DestroyService.new(project, current_user, {}).execute + end + user.destroy end end |