projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
16263: Add local_user_list flag to bypass LoginCluster behavior
[arvados.git]
/
lib
/
controller
/
fed_containers.go
diff --git
a/lib/controller/fed_containers.go
b/lib/controller/fed_containers.go
index 8bb68d171fc672684be2704373db9030c933559c..a923f757f2eb61afc29d27ee18bfbd42a27a6c1c 100644
(file)
--- a/
lib/controller/fed_containers.go
+++ b/
lib/controller/fed_containers.go
@@
-33,9
+33,12
@@
func remoteContainerRequestCreate(
creds := auth.NewCredentials()
creds.LoadTokensFromHTTPRequest(req)
creds := auth.NewCredentials()
creds.LoadTokensFromHTTPRequest(req)
- currentUser, err := h.handler.validateAPItoken(req, creds.Tokens[0])
+ currentUser,
ok,
err := h.handler.validateAPItoken(req, creds.Tokens[0])
if err != nil {
if err != nil {
- httpserver.Error(w, err.Error(), http.StatusForbidden)
+ httpserver.Error(w, err.Error(), http.StatusInternalServerError)
+ return true
+ } else if !ok {
+ httpserver.Error(w, "invalid API token", http.StatusForbidden)
return true
}
return true
}