use admin

This commit is contained in:
Ryan McKinley committed 2024-11-20 16:02:16 +03:00
1 parent fbcc82ab17
commit ffa47a9746
2 files changed
+12 -3

No files matched your search

@@ -78,9 +78,14 @@ func (o *backgroundIdentities) WorkerIdentity(ctx context.Context, namespace str
id, ok := o.accounts[info.OrgID]
if !ok {
if false { // <<<<< HACK
// HACK, use the global admin!!!
id = "user:1"
// HACK -- (if false) and still allow lint
switch o.serviceAccountNamePrefix {
case "NOPE":
id, err = o.makeAdminUser(ctx, info.OrgID)
} else {
case "xxxx":
id, err = o.verifyServiceAccount(ctx, info.OrgID)
}
+5 -1
View File
@@ -2,6 +2,7 @@ package provisioning
import (
"context"
"encoding/json"
"fmt"
"log/slog"
"net/http"
@@ -116,7 +117,10 @@ func (s *helloWorldSubresource) Connect(ctx context.Context, name string, opts r
responder.Error(err)
return
}
responder.Object(200, ttt) // proxy the list
// responder not happy flipping types
out, _ := json.Marshal(ttt)
w.Write(out)
return
}