删除组员的时候同步gitlab数据
This commit is contained in:
parent
f2fe59ed0f
commit
7ec2cf834f
|
|
@ -163,8 +163,13 @@ class ShixunsController < ApplicationController
|
|||
|
||||
def collaborators_delete
|
||||
user_id = params[:c_id]
|
||||
gid = User.find(user_id).try(:gid)
|
||||
shixun_member = ShixunMember.where(:user_id => user_id, :shixun_id => @shixun.id, :role => 2).first
|
||||
shixun_member.delete
|
||||
g = Gitlab.client
|
||||
unless gid.nil?
|
||||
g.remove_team_member(@shixun.gpid, gid)
|
||||
end
|
||||
@collaborators = @shixun.collaborators
|
||||
respond_to do |format|
|
||||
format.js
|
||||
|
|
|
|||
Loading…
Reference in New Issue