perf(salix): refs #6427 rellocated condition
This commit is contained in:
parent
9953df2f4f
commit
739391243b
|
@ -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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue