Browse Source

解绑时先判断是否是trustie提供服务器的场景

tags/v3.0.0
moshenglv 5 years ago
parent
commit
06b8aab455
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      app/controllers/ci/cloud_accounts_controller.rb

+ 6
- 4
app/controllers/ci/cloud_accounts_controller.rb View File

@@ -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…
Cancel
Save