update list users for client
This commit is contained in:
@@ -125,7 +125,13 @@ export async function listUsers(user: AuthenticatedUser) {
|
||||
return await userModel
|
||||
.find({
|
||||
$and: [
|
||||
{ tenantId: user.tenantId, orgId: user.orgId, role: "client" },
|
||||
{ tenantId: user.tenantId },
|
||||
{
|
||||
$or: [
|
||||
{ orgId: user.orgId, role: "client" },
|
||||
{ role: { $in: ["admin", "team", "superAdmin"] } },
|
||||
],
|
||||
},
|
||||
{ dev: { $ne: true } },
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user