Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_course
daiao 6 years ago
commit 2233a076bb

@ -16,8 +16,8 @@ class GitsController < ApplicationController
username_password = Base64.decode64(request.env["HTTP_AUTHORIZATION"].split(" ")[1])
input_username = username_password.split(":")[0].strip()
input_password = username_password.split(":")[1].strip()
uid_logger("git start auth: input_username is 55#{input_username}55")
uid_logger("git start auth: password is 66#{input_password}66")
uid_logger("git start auth: input_username is #{input_username}")
# Git 超级权限用户
if input_username.strip == gituser.strip && input_password.strip == gitpassword.strip
@ -28,7 +28,7 @@ class GitsController < ApplicationController
# 如果用户名密码错误
if !system_user.check_password?(input_password)
uid_logger_error("git start: password is wrong#77#{input_password}77")
uid_logger_error("git start: password is wrong")
result = false
else
git_url = params["url"]
@ -44,12 +44,13 @@ class GitsController < ApplicationController
if system_user.present? && system_user.manager_of_shixun?(shixun)
result = true
else
logger.info("git411 start")
uid_logger_error("gituser is not shixun manager")
result = false
end
else
render :json => { :status => 404 }
result = false
uid_logger_error("shixun is not exist")
# result = false
result = true # 为了测试跳出
end
end
end

Loading…
Cancel
Save