Skip to content

Commit 5781426

Browse files
rjcloudsigmacloudsigma
andauthored
fix: register taas.autorouter.lastRoute under operator.read scope (#9)
Without an explicit scope, the gateway auth path defaults plugin RPC methods to operator.admin (see method-scopes.ts:authorizeOperatorScopesForMethod). That blocked the Studio (which connects with operator.read+write but not admin) and CLI calls from invoking the method. Setting opts.scope=operator.read makes the read-only autorouter lookup available to any Studio operator. Co-authored-by: cloudsigma <cloudsigma@snowcrash.tail77dc93.ts.net>
1 parent 191fdb6 commit 5781426

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,8 @@ export default {
872872
directSessionId ?? resolveSessionId(workspaceDir).sessionId
873873
const captured = getLastRouteForSession(resolvedSessionId)
874874
respond(true, { sessionId: resolvedSessionId, capture: captured })
875-
}
875+
},
876+
{ scope: "operator.read" }
876877
)
877878
},
878879
}

0 commit comments

Comments
 (0)