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 7fd5b25ad22b8b946f7a36e57859cce1896d80e7..a923f757f2eb61afc29d27ee18bfbd42a27a6c1c 100644
(file)
--- a/
lib/controller/fed_containers.go
+++ b/
lib/controller/fed_containers.go
@@
-12,8
+12,8
@@
import (
"net/http"
"strings"
"net/http"
"strings"
- "git.
curoverse.com
/arvados.git/sdk/go/auth"
- "git.
curoverse.com
/arvados.git/sdk/go/httpserver"
+ "git.
arvados.org
/arvados.git/sdk/go/auth"
+ "git.
arvados.org
/arvados.git/sdk/go/httpserver"
)
func remoteContainerRequestCreate(
)
func remoteContainerRequestCreate(
@@
-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
}