diff --git a/db/changes/233801/00-ticketConfig.sql b/db/changes/233801/00-ticketConfig.sql index d80dcd7ab..5cef1ba5f 100644 --- a/db/changes/233801/00-ticketConfig.sql +++ b/db/changes/233801/00-ticketConfig.sql @@ -10,4 +10,9 @@ UPDATE vn.address isActive = 0 WHERE id IN (6,47); - INSERT INTO `salix`.`ACL` (id, model, property, accessType, permission, principalType, principalId) VALUES(698, 'Item', 'setVisibleDiscard', 'WRITE', 'ALLOW', 'ROLE', 'employee'); + INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId) + VALUES('Item', 'setVisibleDiscard', 'WRITE', 'ALLOW', 'ROLE', 'employee'); + + INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId) + VALUES('Address', 'getAddress', 'READ', 'ALLOW', 'ROLE', 'employee'); + diff --git a/modules/client/back/methods/address/specs/getAddress.spec.js b/modules/client/back/methods/address/specs/getAddress.spec.js index 707d7360b..2c84769e6 100644 --- a/modules/client/back/methods/address/specs/getAddress.spec.js +++ b/modules/client/back/methods/address/specs/getAddress.spec.js @@ -1,8 +1,8 @@ const {models} = require('vn-loopback/server/server'); -describe('getAddressa()', () => { +describe('getAddress()', () => { fit('return list of address last year', async() => { - let response = await models.Addressa.getAddress(); + let response = await models.Address.getAddress(); expect(response.length).toBeGreaterThan(0); expect(response[0].addressFk).toEqual(1);