From aa2a8a2ce8eee46c333d74bb7fb996e0371e483a Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Mon, 1 Jul 2024 11:43:12 +0200 Subject: [PATCH] feat(salix): refs #7648 #7648 buyLabel --- db/versions/11118-limeCymbidium/00-firstScript.sql | 2 ++ modules/entry/back/methods/entry/buyLabel.js | 3 ++- modules/entry/back/models/entry.js | 3 --- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/db/versions/11118-limeCymbidium/00-firstScript.sql b/db/versions/11118-limeCymbidium/00-firstScript.sql index fbbbb69a1..52ab2acbd 100644 --- a/db/versions/11118-limeCymbidium/00-firstScript.sql +++ b/db/versions/11118-limeCymbidium/00-firstScript.sql @@ -6,3 +6,5 @@ INSERT INTO salix.ACL (model,property,accessType,permission,principalType,princi -- Auto-generated SQL script #202406281452 INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) VALUES ('Entry','getBuys','READ','ALLOW','ROLE','$authenticated'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Entry','buyLabel','READ','ALLOW','ROLE','$authenticated'); diff --git a/modules/entry/back/methods/entry/buyLabel.js b/modules/entry/back/methods/entry/buyLabel.js index 650b05c97..d9b0ebf1d 100644 --- a/modules/entry/back/methods/entry/buyLabel.js +++ b/modules/entry/back/methods/entry/buyLabel.js @@ -29,7 +29,8 @@ module.exports = Self => { http: { path: '/:id/buy-label', verb: 'GET' - } + }, + accessScopes: ['DEFAULT', 'read:multimedia'] }); Self.buyLabel = (ctx, id) => Self.printReport(ctx, id, 'buy-label'); diff --git a/modules/entry/back/models/entry.js b/modules/entry/back/models/entry.js index bd972d6e5..6e27e1ece 100644 --- a/modules/entry/back/models/entry.js +++ b/modules/entry/back/models/entry.js @@ -9,10 +9,7 @@ module.exports = Self => { require('../methods/entry/entryOrderPdf')(Self); require('../methods/entry/addFromPackaging')(Self); require('../methods/entry/addFromBuy')(Self); -<<<<<<< HEAD -======= require('../methods/entry/buyLabel')(Self); ->>>>>>> 5c8d8ba28 (refs #7644 Added locales and changed name of method) Self.observe('before save', async function(ctx, options) { if (ctx.isNewInstance) return;