Update to verify middleware & lists agenst new permissions tables

This commit is contained in:
Owen Schwartz 2024-10-06 16:19:04 -04:00
parent 0838679120
commit 20db6d450c
No known key found for this signature in database
GPG key ID: 8271FDFFD9E0CCBD
12 changed files with 275 additions and 128 deletions

View file

@ -26,7 +26,8 @@ export function verifyOrgAccess(req: Request, res: Response, next: NextFunction)
next(createHttpError(HttpCode.FORBIDDEN, 'User does not have access to this organization'));
} else {
// User has access, attach the user's role to the request for potential future use
req.userOrgRole = result[0].role;
req.userOrgRoleId = result[0].roleId;
req.userOrgId = orgId;
next();
}
})