From 318c014fabfd1e39a7c48b613aab6082bbf53098 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 23 May 2019 08:03:31 +0200 Subject: [PATCH 1/2] Clone item without size --- modules/item/back/methods/item/clone.js | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/item/back/methods/item/clone.js b/modules/item/back/methods/item/clone.js index 14fc1e365..d2f887354 100644 --- a/modules/item/back/methods/item/clone.js +++ b/modules/item/back/methods/item/clone.js @@ -35,6 +35,7 @@ module.exports = Self => { origin.description = undefined; origin.image = undefined; origin.comment = undefined; + origin.size = undefined; const newItem = await Self.create(origin, options); From 34542ce12ff23f4747b063c189716c05cc6473eb Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 23 May 2019 11:39:14 +0200 Subject: [PATCH 2/2] message send ACL fix #1464 --- db/changes/10004-mother/00-acl.sql | 6 ++++++ modules/client/back/methods/sms/send.js | 1 + 2 files changed, 7 insertions(+) diff --git a/db/changes/10004-mother/00-acl.sql b/db/changes/10004-mother/00-acl.sql index 3e7961061..b1be18c78 100644 --- a/db/changes/10004-mother/00-acl.sql +++ b/db/changes/10004-mother/00-acl.sql @@ -8,3 +8,9 @@ INSERT INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission` (170, 'WorkerTimeControl', 'addTime', 'WRITE', 'ALLOW', 'ROLE', 'employee'), (171, 'TicketServiceType', '*', 'WRITE', 'ALLOW', 'ROLE', 'administrative'); +-- ONLY FOR ACL ALREADY ON PRODUCTION +INSERT IGNORE INTO `salix`.`ACL` (`id`, `model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES + (172, 'Sms', '*', 'READ', 'ALLOW', 'ROLE', 'employee'), + (173, 'Sms', 'send', 'WRITE', 'ALLOW', 'ROLE', 'employee'); + diff --git a/modules/client/back/methods/sms/send.js b/modules/client/back/methods/sms/send.js index d11b722f5..2446fb95d 100644 --- a/modules/client/back/methods/sms/send.js +++ b/modules/client/back/methods/sms/send.js @@ -5,6 +5,7 @@ const UserError = require('vn-loopback/util/user-error'); module.exports = Self => { Self.remoteMethodCtx('send', { description: 'Sends SMS to a destination phone', + accessType: 'WRITE', accepts: [{ arg: 'destinationFk', type: 'Integer'