fix(webui): resolve a selected org's workspaces as the caller, wire selection into gateway and harness, and let a member start tasks in the org they selected

This commit is contained in:
sam committed 2026-10-27 11:06:18 +11:00
1 parent c3d49cbc6c
commit 4bb473c0b0
12 files changed
+101 -21

No files matched your search

@@ -81,7 +81,7 @@ func (c Callers) resolve(ctx context.Context) (context.Context, error) {
}
// The forwarded org is a claim: the membership check, not the metadata,
// decides whether the call may act there.
p, err = p.Select(ctx, org.OrgID(first(md, OrgKey)), c.Workspaces)
p, err = p.Select(org.WithOrg(access.WithPrincipal(ctx, p), p.Org), org.OrgID(first(md, OrgKey)), c.Workspaces)
if err != nil {
if errors.Is(err, access.ErrNotMember) {
return nil, status.Error(codes.PermissionDenied, err.Error())