forked from wangziqi/gongxue-base
feat: enforce trusted session identity
This commit is contained in:
@@ -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> }>(
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user