From 7bf20c692fefd9f1bf38ab4f955611fb681c9a4d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 23 Apr 2020 15:23:00 +0800 Subject: [PATCH] =?UTF-8?q?gitlab=E7=94=A8=E6=88=B7=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/trustie/gitlab/helper.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/trustie/gitlab/helper.rb b/lib/trustie/gitlab/helper.rb index 30249198..1da10044 100644 --- a/lib/trustie/gitlab/helper.rb +++ b/lib/trustie/gitlab/helper.rb @@ -28,6 +28,9 @@ module Trustie begin u = find_user(user) unless u.present? + if user.hashed_password.blank? + user.salt_password("edu12345678") + end u = self.g.create_user(user.mail, user.hashed_password, name: user.show_name, username: user.login, confirm: "true") Rails.logger.warn("create gitlab log ##user.mail is #{user.mail}, name is #{user.show_name}, u id is#{u.id}") user.gid = u.id