This commit is contained in:
Carlos Jimenez Ruiz 2019-05-24 15:31:03 +02:00
commit f2752d9098
3 changed files with 8 additions and 0 deletions

View File

@ -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');

View File

@ -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'

View File

@ -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);