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(); };