refs #6085 remove myOptions
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-12-11 10:16:46 +01:00
parent 6ac5d28c40
commit 53ff8784ff
1 changed files with 2 additions and 6 deletions

View File

@ -24,14 +24,10 @@ module.exports = Self => {
const userId = ctx.options.accessToken.userId;
const models = Self.app.models;
const myOptions = {};
Object.assign(myOptions);
const roles = await models.RoleMapping.find({
fields: ['roleId'],
where: {principalId: userId}
}, myOptions);
});
const availableMailAlias = await models.MailAliasAcl.find({
fields: ['mailAliasFk'],
@ -42,7 +38,7 @@ module.exports = Self => {
},
mailAliasFk
}
}, myOptions);
});
if (!availableMailAlias.length) throw new UserError('The alias cant be modified');
}