message send ACL fix #1464
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-05-23 11:39:14 +02:00
parent f7aeaa707f
commit 34542ce12f
2 changed files with 7 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'