[arvados] updated: 2.4.2-28-g2b2a0d938

git repository hosting git at public.arvados.org
Tue Sep 20 17:46:53 UTC 2022


Summary of changes:
 services/keep-web/handler.go | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

       via  2b2a0d938049507107fa8cabbcd10fe4c5e4a4de (commit)
      from  6e992b73bf60a23b2ca10ca9694e5dff4d1497cc (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 2b2a0d938049507107fa8cabbcd10fe4c5e4a4de
Author: Tom Clegg <tom at curii.com>
Date:   Tue Sep 20 13:44:12 2022 -0400

    19428: Fix failing request on normal failed user lookup case.
    
    refs #19428
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/services/keep-web/handler.go b/services/keep-web/handler.go
index 4c6145463..be9232da4 100644
--- a/services/keep-web/handler.go
+++ b/services/keep-web/handler.go
@@ -6,6 +6,7 @@ package main
 
 import (
 	"encoding/json"
+	"errors"
 	"fmt"
 	"html"
 	"html/template"
@@ -490,7 +491,11 @@ func (h *handler) ServeHTTP(wOrig http.ResponseWriter, r *http.Request) {
 		http.Error(w, "session cache: "+err.Error(), http.StatusInternalServerError)
 	}
 	tokenUser, err = h.Config.Cache.GetTokenUser(arv.ApiToken)
-	if err != nil {
+	if e := (interface{ HTTPStatus() int })(nil); errors.As(err, &e) && e.HTTPStatus() == http.StatusForbidden {
+		// Ignore expected error looking up user record when
+		// using a scoped token that allows getting
+		// collections/X but not users/current
+	} else if err != nil {
 		http.Error(w, "user lookup: "+err.Error(), http.StatusInternalServerError)
 	}
 

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list