socialforge/lib/trustie/gitlab/manage_user.rb

37 lines
706 B
Ruby
Raw Normal View History

2015-10-21 17:13:07 +08:00
#coding=utf-8
#
#
require_relative 'helper'
module Trustie
module Gitlab
module ManageUser
include Helper
def self.included(base)
base.class_eval {
#before_create :add_gitlab_user
#before_destroy :delete_gitlab_user
2015-11-23 22:10:28 +08:00
#before_save :change_gitlab_user
2015-10-21 17:13:07 +08:00
}
end
def add_gitlab_user
add_user(self)
end
def delete_gitlab_user
del_user(self)
end
2015-11-23 21:54:40 +08:00
#
#def change_gitlab_user
# change_password(self.gid, self.hashed_password, self.salt)
#end
2015-10-21 17:13:07 +08:00
def g
@g ||= ::Gitlab.client
end
end
end
end