feat: pin sessions to workspace revisions

This commit is contained in:
2026-08-04 05:18:08 +02:00
parent bc39730b58
commit 6c09adc05e
3 changed files with 68 additions and 4 deletions
+2 -4
View File
@@ -121,10 +121,8 @@ export function sessionRoutes(
};
/** RLS makes a foreign session indistinguishable from a missing one. */
const authorize = async (principal: PrincipalContext, id: string): Promise<LocatedSession | undefined> => {
const located = await locateSession(principal, id);
return located && await resolveSessionWorkspace(located);
};
const authorize = async (principal: PrincipalContext, id: string): Promise<LocatedSession | undefined> =>
await locateSession(principal, id);
const storageFailure = (reply: any) => reply.code(503).send({ error: "session storage is unavailable" });
const lifecycleFailure = (reply: any, error: unknown) =>