#3000 add buyer to ticket isEditable

This commit is contained in:
Carlos Jimenez Ruiz 2021-06-25 09:46:18 +02:00
parent 790c3729aa
commit 2548fdc891
1 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,9 @@ module.exports = Self => {
const isSalesAssistant = await Self.app.models.Account.hasRole(userId, 'salesAssistant', myOptions);
const isProductionBoss = await Self.app.models.Account.hasRole(userId, 'productionBoss', myOptions);
const isValidRole = isSalesAssistant || isProductionBoss;
const isBuyer = await Self.app.models.Account.hasRole(userId, 'buyer', myOptions);
const isValidRole = isSalesAssistant || isProductionBoss || isBuyer;
let alertLevel = state ? state.alertLevel : null;
let ticket = await Self.app.models.Ticket.findById(id, {