feat(embed): scope OAuth and sessions per visitor principal
Add embed visitor principals (X-Embed-Visitor), widen sessions.user_id, embed MCP OAuth/approval routes, OAuth callback context detachment, and CloneContext principal preservation for async QA streams.
This commit is contained in:
@@ -69,8 +69,7 @@ func sessionUserIDForLookup(ctx context.Context) string {
|
||||
// Shared-agent pipelines resolve the session owner tenant first; keep that internal lookup tenant-scoped.
|
||||
return ""
|
||||
}
|
||||
userID, _ := types.UserIDFromContext(ctx)
|
||||
return userID
|
||||
return types.SessionOwnerIDFromContext(ctx)
|
||||
}
|
||||
|
||||
// CreateMessage creates a new message within an existing session
|
||||
|
||||
Reference in New Issue
Block a user