wocao
This commit is contained in:
+3
-6
@@ -4,8 +4,6 @@ import (
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
|
||||
"simplegit/common"
|
||||
)
|
||||
|
||||
func (s *Server) authorizeRead(w http.ResponseWriter, r *http.Request, repo string) bool {
|
||||
@@ -13,10 +11,9 @@ func (s *Server) authorizeRead(w http.ResponseWriter, r *http.Request, repo stri
|
||||
http.Error(w, "missing repo", http.StatusBadRequest)
|
||||
return false
|
||||
}
|
||||
if _, status, msg := s.authorize(r, repo, common.PermRead); status != 0 {
|
||||
http.Error(w, msg, status)
|
||||
return false
|
||||
}
|
||||
// No local JWT/JWKS check: /raw, /archive, /patch are reached only via the
|
||||
// console gateway (which authenticates the user) or internally. smart-HTTP
|
||||
// clone/push auth lives in the daemon App (PAT-based), not here.
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user