From 9b57aa80ba76fc7fbf8c1cb12c0b82a0aa454201 Mon Sep 17 00:00:00 2001
From: jingquan huang <huang.jingquan@163.com>
Date: Tue, 25 Jun 2019 09:40:47 +0800
Subject: [PATCH] git auth

---
 app/controllers/gits_controller.rb | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/app/controllers/gits_controller.rb b/app/controllers/gits_controller.rb
index c3fa30270..f00245190 100644
--- a/app/controllers/gits_controller.rb
+++ b/app/controllers/gits_controller.rb
@@ -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