From 739391243b491d31b58624c514e131ebc4fff0d6 Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 27 May 2024 09:15:30 +0200 Subject: [PATCH] perf(salix): refs #6427 rellocated condition --- back/models/vn-user.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/back/models/vn-user.js b/back/models/vn-user.js index a2db8e86b..b374050a8 100644 --- a/back/models/vn-user.js +++ b/back/models/vn-user.js @@ -220,6 +220,7 @@ module.exports = function(Self) { const ctxToken = {req: {accessToken}}; if (userId === accessToken.userId) return; + // if (ctx.args?.recoveryPhone) throw new ForbiddenError(); const myOptions = {}; if (typeof options == 'object') @@ -232,8 +233,6 @@ module.exports = function(Self) { const user = await models.VnUser.findById(userId, {fields: ['id', 'emailVerified']}, myOptions); if (!user.emailVerified && hasMediumPrivileges) return; - if (ctx.args?.recoveryPhone) throw new ForbiddenError(); - throw new ForbiddenError(); };