feat: allow users to have access to multiple oorgs

This commit is contained in:
2025-12-01 17:26:35 +05:30
parent 06a7b961ed
commit 8241fa3eaa
17 changed files with 117 additions and 44 deletions

View File

@@ -152,7 +152,11 @@ export async function listNotifications(
});
if (user.role == "client") {
filterObj.push({ client: new mongoose.Types.ObjectId(user.orgId) });
filterObj.push({
client: {
$in: user.orgId.map((item) => new mongoose.Types.ObjectId(item)),
},
});
}
let { taggedFilter, taggedUserFilterIndex } = getTaggedUsersFilter(