fix: transfer repository owner complete not include organization

This commit is contained in:
yystopf 2021-09-08 18:16:02 +08:00
parent 84aed0391a
commit d5de6aa66b
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ class Projects::ApplyTransferService < ApplicationService
raise Error, '仓库标识不正确' if @project.identifier != params[:identifier] raise Error, '仓库标识不正确' if @project.identifier != params[:identifier]
raise Error, '该仓库正在迁移' if @project.is_transfering raise Error, '该仓库正在迁移' if @project.is_transfering
raise Error, '新拥有者不存在' unless @owner.present? raise Error, '新拥有者不存在' unless @owner.present?
raise Error, '新拥有者资料不完善' unless @owner.profile_completed raise Error, '新拥有者资料不完善' if @owner.is_a?(User) && !@owner.profile_completed
raise Error, '新拥有者已经存在同名仓库!' if Project.where(user_id: @owner.id, identifier: params[:identifier]).present? raise Error, '新拥有者已经存在同名仓库!' if Project.where(user_id: @owner.id, identifier: params[:identifier]).present?
raise Error, '未拥有转移权限' unless is_permit_owner raise Error, '未拥有转移权限' unless is_permit_owner
end end