From e7b290a304c4bf28234a601fa8b25b7ae63ed6a5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 15 Nov 2019 19:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=91=E4=B8=8A=E5=AE=9E=E9=AA=8C=E5=AE=A4gi?= =?UTF-8?q?t=E6=9D=83=E9=99=90=E6=8E=A7=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/gits_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb index e94c197ed..0d949a1a2 100644 --- a/app/controllers/gits_controller.rb +++ b/app/controllers/gits_controller.rb @@ -49,7 +49,8 @@ class GitsController < ApplicationController shixunname = git_url.split("/")[1].split(".")[0] repo_name = username + "/" + shixunname uid_logger("git start: repo_name is #{repo_name}") - shixun = Shixun.select([:id, :user_id, :repo_name, :identifier]).where(repo_name: repo_name).first + user_id = User.find_by_login(username) + shixun = Shixun.select([:id, :user_id, :repo_name, :identifier]).where(repo_name: repo_name, user_id: user_id).first uid_logger("git start auth: shixun identifier is #{shixun.try(:identifier)}") uid_logger("git start auth: systemuser is #{system_user.try(:login)}")