forked from Gitlink/forgeplus
解绑时先判断是否是trustie提供服务器的场景
This commit is contained in:
parent
cbe5b3afde
commit
06b8aab455
|
@ -96,12 +96,14 @@ class Ci::CloudAccountsController < Ci::BaseController
|
|||
|
||||
def unbind
|
||||
ActiveRecord::Base.transaction do
|
||||
unbind_account!
|
||||
if @repos
|
||||
@repos.each do |repo|
|
||||
repo.deactivate!
|
||||
if current_user.ci_cloud_account.server_type == Ci::CloudAccount::SERVER_TYPE_TRUSTIE
|
||||
if @repos
|
||||
@repos.each do |repo|
|
||||
repo.deactivate!
|
||||
end
|
||||
end
|
||||
end
|
||||
unbind_account!
|
||||
render_ok
|
||||
end
|
||||
rescue Exception => ex
|
||||
|
|
Loading…
Reference in New Issue