Commit 8b7cabd5 authored by liugaoling's avatar liugaoling

authorization

parent 8462b9b9
...@@ -21,7 +21,6 @@ func main() { ...@@ -21,7 +21,6 @@ func main() {
// Only allowed to "Pull". If "Push" access needed, define the rules via static ACL // Only allowed to "Pull". If "Push" access needed, define the rules via static ACL
fmt.Println("The user " + authReqInfo.Account + " requesting \"push\" access for the Repo: " + authReqInfo.Name) fmt.Println("The user " + authReqInfo.Account + " requesting \"push\" access for the Repo: " + authReqInfo.Name)
isAuthorized := utils.HttpAuth(authReqInfo) isAuthorized := utils.HttpAuth(authReqInfo)
isAuthorized = true
if isAuthorized { if isAuthorized {
os.Exit(utils.SuccessExitCode) os.Exit(utils.SuccessExitCode)
......
...@@ -80,6 +80,6 @@ func HttpAuth(authReqInfo authz.AuthRequestInfo) bool { ...@@ -80,6 +80,6 @@ func HttpAuth(authReqInfo authz.AuthRequestInfo) bool {
result, _ := strconv.ParseBool(string(body)) result, _ := strconv.ParseBool(string(body))
return result return result
} }
fmt.Println(string(body))
return false return false
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment