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

dev_course
daiao 6 years ago
commit e6a40b9c14

@ -3,7 +3,8 @@ class GitsController < ApplicationController
#供git-workhorse反向调用认证
def auth
# HTTP_AUTHORIZATION: "Basic 这里base64编码的的密码(user:passwd)"
logger.info("11111112222223333#{request.env["HTTP_AUTHORIZATION"]}")
logger.info("11111112222223333 HTTP_AUTHORIZATION: #{request.env["HTTP_AUTHORIZATION"]}")
logger.info("11111112222223333: request is #{request.env}")
#logger.info("#########-----request_env: #{request.env}")
# {"service"=>"git-receive-pack", "controller"=>"gits", "action"=>"auth",
# "url"=>"forge01/cermyt39.git/info/refs"}
@ -19,7 +20,7 @@ class GitsController < ApplicationController
uid_logger("git start auth: input_username is #{input_username}")
# Git 超级权限用户
if input_username == gituser && input_password == gitpassword
if input_username.strip == gituser.strip && input_password.strip == gitpassword.strip
result = true
else
# 用户是否对对象拥有权限

@ -715,7 +715,7 @@ private
return
end
if !current_user.shixun_permission(@shixun) || (@shixun.status == -1 && !current_user.admin?)
if !current_user.shixun_permission(@shixun)
tip_exception(403, "..")
end
end

Loading…
Cancel
Save