use variable
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2022-04-08 09:02:27 +02:00
parent 8c2bc76b88
commit 90a19d52fb
1 changed files with 2 additions and 2 deletions

View File

@ -89,12 +89,12 @@ module.exports = function(Self) {
const args = ctx.args;
const userId = ctx.req.accessToken.userId;
const myOptions = {};
const isSalesAssistant = await Self.app.models.Account.hasRole(userId, 'salesAssistant', myOptions);
const isSalesAssistant = await models.Account.hasRole(userId, 'salesAssistant', myOptions);
if (typeof options == 'object')
Object.assign(myOptions, options);
if (ctx.args.isLogifloraAllowed && !isSalesAssistant)
if (args.isLogifloraAllowed && !isSalesAssistant)
throw new UserError(`You don't have enough privileges`);
const address = await models.Address.findOne({