update gui

This commit is contained in:
2026-07-28 21:11:54 -05:00
parent 6c4ce8f6df
commit 555aae0ab2
12 changed files with 71 additions and 58 deletions
+3 -3
View File
@@ -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
}