|
|
@ -38,7 +38,6 @@ class GitsController < ApplicationController
|
|
|
|
else
|
|
|
|
else
|
|
|
|
# 用户是否对对象拥有权限
|
|
|
|
# 用户是否对对象拥有权限
|
|
|
|
system_user = User.find_by_login(input_username) || User.find_by_mail(input_username) || User.find_by_phone(input_username)
|
|
|
|
system_user = User.find_by_login(input_username) || User.find_by_mail(input_username) || User.find_by_phone(input_username)
|
|
|
|
|
|
|
|
|
|
|
|
# 如果用户名密码错误
|
|
|
|
# 如果用户名密码错误
|
|
|
|
if system_user && !system_user.check_password?(input_password)
|
|
|
|
if system_user && !system_user.check_password?(input_password)
|
|
|
|
uid_logger_error("git start: password is wrong")
|
|
|
|
uid_logger_error("git start: password is wrong")
|
|
|
@ -49,7 +48,7 @@ class GitsController < ApplicationController
|
|
|
|
shixunname = git_url.split("/")[1].split(".")[0]
|
|
|
|
shixunname = git_url.split("/")[1].split(".")[0]
|
|
|
|
repo_name = username + "/" + shixunname
|
|
|
|
repo_name = username + "/" + shixunname
|
|
|
|
uid_logger("git start: repo_name is #{repo_name}")
|
|
|
|
uid_logger("git start: repo_name is #{repo_name}")
|
|
|
|
shixun = Shixun.select([:id, :user_id, :repo_name, :identifier]).where(repo_name: repo_name, laboratory_id: nil).first
|
|
|
|
shixun = Shixun.select([:id, :user_id, :repo_name, :identifier]).where(repo_name: repo_name).first
|
|
|
|
uid_logger("git start auth: shixun identifier is #{shixun.try(:identifier)}")
|
|
|
|
uid_logger("git start auth: shixun identifier is #{shixun.try(:identifier)}")
|
|
|
|
uid_logger("git start auth: systemuser is #{system_user.try(:login)}")
|
|
|
|
uid_logger("git start auth: systemuser is #{system_user.try(:login)}")
|
|
|
|
|
|
|
|
|
|
|
|