Merge branch 'develop' into standalone_develop

This commit is contained in:
viletyy 2022-10-27 09:30:09 +08:00
commit 761c311a88
1 changed files with 1 additions and 1 deletions

View File

@ -26,8 +26,8 @@ class Projects::TransferService < ApplicationService
def update_owner def update_owner
# 转移项目需要移除原来的权限 # 转移项目需要移除原来的权限
project.members.map{|m| m.destroy! if m.user_id == owner.id || project.member(new_owner.id) || (new_owner.is_a?(Organization) && new_owner.is_member?(m.user_id)) } project.members.map{|m| m.destroy! if m.user_id == owner.id || project.member(new_owner.id) || (new_owner.is_a?(Organization) && new_owner.is_member?(m.user_id)) }
project.set_owner_permission(new_owner)
project.update!(user_id: new_owner.id) project.update!(user_id: new_owner.id)
project.set_owner_permission(new_owner)
end end
def update_repo_url def update_repo_url