mirror of
https://github.com/fosrl/pangolin.git
synced 2025-08-30 14:39:29 +02:00
Update to verify middleware & lists agenst new permissions tables
This commit is contained in:
parent
0838679120
commit
20db6d450c
12 changed files with 275 additions and 128 deletions
|
@ -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();
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue