This commit is contained in:
parent
6ac5d28c40
commit
53ff8784ff
|
@ -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');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue