mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-05 18:26:40 +00:00
Update to verify middleware & lists agenst new permissions tables
This commit is contained in:
@@ -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();
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user