mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-31 15:06:42 +00:00
Make work for demo
This commit is contained in:
@@ -4,6 +4,7 @@ import { and, eq } from "drizzle-orm";
|
||||
import createHttpError from "http-errors";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
import { checkOrgAccessPolicy } from "#dynamic/lib/checkOrgAccessPolicy";
|
||||
import { getUserOrgRoleIds } from "@server/lib/userOrgRoles";
|
||||
|
||||
export async function verifySiteProvisioningKeyAccess(
|
||||
req: Request,
|
||||
@@ -116,8 +117,11 @@ export async function verifySiteProvisioningKeyAccess(
|
||||
}
|
||||
}
|
||||
|
||||
const userOrgRoleId = req.userOrg.roleId;
|
||||
req.userOrgRoleId = userOrgRoleId;
|
||||
req.userOrgRoleIds = await getUserOrgRoleIds(
|
||||
req.userOrg.userId,
|
||||
row.siteProvisioningKeyOrg.orgId
|
||||
);
|
||||
req.userOrgId = row.siteProvisioningKeyOrg.orgId;
|
||||
|
||||
return next();
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user