update gui
This commit is contained in:
@@ -91,13 +91,13 @@ func (s *Server) handleCallback(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
user, err := s.exchangeOAuthCode(r.Context(), code)
|
||||
if err != nil {
|
||||
log.Printf("Gitea OAuth code exchange failed: %v", err)
|
||||
http.Error(w, "Gitea sign-in failed", http.StatusBadGateway)
|
||||
log.Printf("Git OAuth code exchange failed: %v", err)
|
||||
http.Error(w, "Git sign-in failed", http.StatusBadGateway)
|
||||
return
|
||||
}
|
||||
if _, allowed := s.cfg.AllowedGiteaUsers[strings.ToLower(user.Login)]; !allowed {
|
||||
_ = s.audit(r.Context(), "login_denied", user.Login, nil, "", "", s.clientIP(r), "user is not allowed")
|
||||
http.Error(w, "this Gitea user is not authorized", http.StatusForbidden)
|
||||
http.Error(w, "this Git user is not authorized", http.StatusForbidden)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user