From da174f6650d06594fcd0366cdbf01d63fb6c6fce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Auricoste?= Date: Mon, 29 Apr 2024 15:45:22 +0200 Subject: [PATCH] fix: affichage des noms dans l'admin --- server/src/http/controllers/user.controller.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/http/controllers/user.controller.ts b/server/src/http/controllers/user.controller.ts index bca1c9217e..84991261ca 100644 --- a/server/src/http/controllers/user.controller.ts +++ b/server/src/http/controllers/user.controller.ts @@ -195,7 +195,6 @@ export default (server: Server) => { const opcoOrAdminRole = await RoleManagement.findOne({ user_id: requestUser._id, authorized_type: { $in: [AccessEntityType.ADMIN, AccessEntityType.OPCO] }, - $expr: { $eq: [{ $arrayElemAt: ["$status.status", -1] }, AccessStatus.GRANTED] }, }).lean() if (opcoOrAdminRole && getLastStatusEvent(opcoOrAdminRole.status)?.status === AccessStatus.GRANTED) { const userIds = userRecruteur.status.flatMap(({ user }) => (user ? [user] : []))