add tester role

This commit is contained in:
2025-03-12 18:38:02 +05:30
parent 973093c074
commit bcab406908
2 changed files with 38 additions and 1 deletions

View File

@@ -59,7 +59,7 @@ export async function getUserByEmail(email: string) {
export async function listUsers(tenantId: string) {
return await userModel
.find({ tenantId: tenantId })
.find({ $and: [{ tenantId: tenantId }, { role: { $ne: "tester" } }] })
.select(
"_id pid orgId firstName lastName name email role avatar status createdAt createdBy lastLogin"
);