From 1291fc4b6c9e96250b243839a4b4bad3ad1dc281 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 4 Jan 2021 11:49:32 +0100 Subject: [PATCH] acl --- db/changes/10260-holidays/00-ACL.sql | 3 ++- e2e/helpers/selectors.js | 1 + e2e/paths/02-client/14_balance.spec.js | 2 ++ modules/client/front/fiscal-data/index.html | 1 - 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/db/changes/10260-holidays/00-ACL.sql b/db/changes/10260-holidays/00-ACL.sql index e72e6fa73..f8afe706c 100644 --- a/db/changes/10260-holidays/00-ACL.sql +++ b/db/changes/10260-holidays/00-ACL.sql @@ -1,2 +1,3 @@ INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) VALUES ('Image', '*', 'WRITE', 'ALLOW', 'ROLE', 'employee'); -INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('PayDem', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); \ No newline at end of file +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('PayDem', '*', 'READ', 'ALLOW', 'ROLE', 'employee'); +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) VALUES ('Receipt', 'createReceipt', '*', 'ALLOW', 'ROLE', 'administrative'); diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 0ed3607ad..cfc50dc0b 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -188,6 +188,7 @@ export default { newPaymentButton: `vn-float-button`, newPaymentBank: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.receipt.bankFk"]', newPaymentAmount: '.vn-dialog.shown vn-input-number[ng-model="$ctrl.receipt.amountPaid"]', + newDescription: 'vn-textfield[ng-model="$ctrl.receipt.description"]', saveButton: '.vn-dialog.shown [response="accept"]', firstLineBalance: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)', firstLineReference: 'vn-client-balance-index vn-tbody > vn-tr:nth-child(1) > vn-td-editable', diff --git a/e2e/paths/02-client/14_balance.spec.js b/e2e/paths/02-client/14_balance.spec.js index 1de02662e..7595957c4 100644 --- a/e2e/paths/02-client/14_balance.spec.js +++ b/e2e/paths/02-client/14_balance.spec.js @@ -47,6 +47,7 @@ describe('Client balance path', () => { await page.closePopup(); await page.waitToClick(selectors.clientBalance.newPaymentButton); await page.autocompleteSearch(selectors.clientBalance.newPaymentBank, 'Pay on receipt'); + await page.write(selectors.clientBalance.newDescription, 'Description'); await page.waitToClick(selectors.clientBalance.saveButton); const message = await page.waitForSnackbar(); @@ -98,6 +99,7 @@ describe('Client balance path', () => { await page.waitToClick(selectors.clientBalance.newPaymentButton); await page.autocompleteSearch(selectors.clientBalance.newPaymentBank, 'Pay on receipt'); await page.overwrite(selectors.clientBalance.newPaymentAmount, '-150'); + await page.write(selectors.clientBalance.newDescription, 'Description'); await page.waitToClick(selectors.clientBalance.saveButton); const message = await page.waitForSnackbar(); diff --git a/modules/client/front/fiscal-data/index.html b/modules/client/front/fiscal-data/index.html index 2b671c69a..c89bdf6a5 100644 --- a/modules/client/front/fiscal-data/index.html +++ b/modules/client/front/fiscal-data/index.html @@ -85,7 +85,6 @@ value-field="id" label="Previous client" info="In case of a company succession, specify the grantor company" - vn-acl="salesAssistant" rule>