feat: enforce trusted session identity

This commit is contained in:
Codex
2026-06-28 21:56:11 +08:00
parent 1d873b2e50
commit 523b63c53b
23 changed files with 502 additions and 201 deletions

View File

@@ -101,8 +101,8 @@ export function tenantPermissionCatalog() {
}
export async function requireTenantAdmin(ctx: RequestContext): Promise<TenantAdminAuth> {
const tenantId = tenantIdFrom(ctx);
const userId = userIdFrom(ctx);
const tenantId = await tenantIdFrom(ctx);
const userId = await userIdFrom(ctx);
const membership = await queryOne<{ role: string; permissions: Record<string, unknown> }>(
`