14198: Add comment about different client objects used by runner
[arvados.git] / lib / controller / fed_containers.go
index e4c80a32cc16bd36d3b45a84077500e186e30304..5c5501d22c73767f87f74d5b5439927c4c4282bb 100644 (file)
@@ -10,6 +10,7 @@ import (
        "fmt"
        "io/ioutil"
        "net/http"
+       "strings"
 
        "git.curoverse.com/arvados.git/sdk/go/auth"
        "git.curoverse.com/arvados.git/sdk/go/httpserver"
@@ -79,7 +80,7 @@ func remoteContainerRequestCreate(
                }
 
                // Must be home cluster for this authorization
-               if currentUser.Authorization.UUID[0:5] == h.handler.Cluster.ClusterID {
+               if strings.HasPrefix(currentUser.Authorization.UUID, h.handler.Cluster.ClusterID) {
                        newtok, err := h.handler.createAPItoken(req, currentUser.UUID, nil)
                        if err != nil {
                                httpserver.Error(w, err.Error(), http.StatusForbidden)