mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-20 03:46:38 +00:00
add user checks in routes
This commit is contained in:
@@ -106,7 +106,7 @@ export async function getOrgUser(
|
||||
);
|
||||
}
|
||||
|
||||
if (user.userId !== req.userOrg.userId) {
|
||||
if (req.user && user.userId !== req.userOrg.userId) {
|
||||
const hasPermission = await checkUserActionPermission(
|
||||
ActionsEnum.getOrgUser,
|
||||
req
|
||||
|
||||
Reference in New Issue
Block a user