mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 18:26:40 +00:00
add sqlite migration
This commit is contained in:
@@ -5,7 +5,6 @@ import { and, eq } from "drizzle-orm";
|
||||
import createHttpError from "http-errors";
|
||||
import HttpCode from "@server/types/HttpCode";
|
||||
import { checkOrgAccessPolicy } from "#dynamic/lib/checkOrgAccessPolicy";
|
||||
import logger from "@server/logger";
|
||||
|
||||
export async function verifyOrgAccess(
|
||||
req: Request,
|
||||
@@ -27,8 +26,6 @@ export async function verifyOrgAccess(
|
||||
);
|
||||
}
|
||||
|
||||
logger.debug(`Verifying access for user ${userId} to organization ${orgId}`);
|
||||
|
||||
try {
|
||||
if (!req.userOrg) {
|
||||
const userOrgRes = await db
|
||||
@@ -71,9 +68,6 @@ export async function verifyOrgAccess(
|
||||
req.userOrgRoleId = req.userOrg.roleId;
|
||||
req.userOrgId = orgId;
|
||||
|
||||
logger.debug(
|
||||
`User ${userId} has access to organization ${orgId} with role ${req.userOrg.roleId}`
|
||||
);
|
||||
return next();
|
||||
} catch (e) {
|
||||
return next(
|
||||
|
||||
Reference in New Issue
Block a user