From be973138566e555c3e5f54f0ed78cdfa7257d302 Mon Sep 17 00:00:00 2001 From: jgallego Date: Wed, 7 Jun 2023 15:40:25 +0200 Subject: [PATCH 1/6] refs #4059 --- db/changes/232001/00-aclClient.sql | 40 +++++++++++++++++++++++++++++ db/changes/232001/01-aclAccount.sql | 13 ++++++++++ 2 files changed, 53 insertions(+) create mode 100644 db/changes/232001/00-aclClient.sql create mode 100644 db/changes/232001/01-aclAccount.sql diff --git a/db/changes/232001/00-aclClient.sql b/db/changes/232001/00-aclClient.sql new file mode 100644 index 000000000..dec6f6136 --- /dev/null +++ b/db/changes/232001/00-aclClient.sql @@ -0,0 +1,40 @@ +-- No encuentro este back +DELETE FROM salix.ACL WHERE property = 'activeWorkersWithRole'; +DELETE FROM salix.ACL WHERE model = 'Client' AND property = '*'; + +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','findOne','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','findById','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','find','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','exists','READ','ALLOW','ROLE','employee'); + +DELETE FROM salix.ACL WHERE model = 'Client' AND accessType = '*' AND property IN ( + 'campaignMetricsEmail', + 'campaignMetricsPdf', + 'clientDebtStatementEmail', + 'clientDebtStatementHtml', + 'clientDebtStatementPdf', + 'clientWelcomeEmail', + 'clientWelcomeHtml', + 'consumptionSendQueued', + 'creditRequestEmail', + 'creditRequestHtml', + 'creditRequestPdf', + 'getClientOrSupplierReference', + 'incotermsAuthorizationEmail', + 'incotermsAuthorizationHtml', + 'incotermsAuthorizationPdf', + 'letterDebtorNdEmail', + 'letterDebtorNdHtml', + 'letterDebtorPdf', + 'letterDebtorStEmail', + 'letterDebtorStHtml', + 'printerSetupEmail', + 'printerSetupHtml', + 'sepaCoreEmail', + 'setPassword', + 'updateUser', + 'uploadFile'); \ No newline at end of file diff --git a/db/changes/232001/01-aclAccount.sql b/db/changes/232001/01-aclAccount.sql new file mode 100644 index 000000000..f618ca842 --- /dev/null +++ b/db/changes/232001/01-aclAccount.sql @@ -0,0 +1,13 @@ +DELETE FROM salix.ACL WHERE model = 'Account' AND property = '*'; + +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','findOne','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','findById','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','find','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','exists','READ','ALLOW','ROLE','employee'); + +DELETE FROM salix.ACL WHERE id=529; +-- 529 VnUser changePassword WRITE ALLOW ROLE account \ No newline at end of file From ee093bbd1cd14b2af724620bd3e7ab6f7ce2df44 Mon Sep 17 00:00:00 2001 From: jgallego Date: Thu, 7 Sep 2023 09:03:25 +0200 Subject: [PATCH 2/6] refs #4059 acls --- db/changes/233801/00-aclClient.sql | 40 +++++++++++++++++++++++++++++ db/changes/233801/01-aclAccount.sql | 10 ++++++++ 2 files changed, 50 insertions(+) create mode 100644 db/changes/233801/00-aclClient.sql create mode 100644 db/changes/233801/01-aclAccount.sql diff --git a/db/changes/233801/00-aclClient.sql b/db/changes/233801/00-aclClient.sql new file mode 100644 index 000000000..5308dbbe2 --- /dev/null +++ b/db/changes/233801/00-aclClient.sql @@ -0,0 +1,40 @@ +-- No encuentro este back +DELETE FROM salix.ACL WHERE property = 'activeWorkersWithRole'; +DELETE FROM salix.ACL WHERE model = 'Client' AND property = '*'; + +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','findOne','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','findById','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','find','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','exists','READ','ALLOW','ROLE','employee'); + +DELETE FROM salix.ACL WHERE model = 'Client' AND property = '*' AND accessType IN ( + 'campaignMetricsEmail', + 'campaignMetricsPdf', + 'clientDebtStatementEmail', + 'clientDebtStatementHtml', + 'clientDebtStatementPdf', + 'clientWelcomeEmail', + 'clientWelcomeHtml', + 'consumptionSendQueued', + 'creditRequestEmail', + 'creditRequestHtml', + 'creditRequestPdf', + 'getClientOrSupplierReference', + 'incotermsAuthorizationEmail', + 'incotermsAuthorizationHtml', + 'incotermsAuthorizationPdf', + 'letterDebtorNdEmail', + 'letterDebtorNdHtml', + 'letterDebtorPdf', + 'letterDebtorStEmail', + 'letterDebtorStHtml', + 'printerSetupEmail', + 'printerSetupHtml', + 'sepaCoreEmail', + 'setPassword', + 'updateUser', + 'uploadFile'); diff --git a/db/changes/233801/01-aclAccount.sql b/db/changes/233801/01-aclAccount.sql new file mode 100644 index 000000000..0f2d6d48c --- /dev/null +++ b/db/changes/233801/01-aclAccount.sql @@ -0,0 +1,10 @@ +DELETE FROM salix.ACL WHERE model = 'Account' AND property = '*' AND principalId = 'employee'; + +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','findOne','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','findById','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','find','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Account','exists','READ','ALLOW','ROLE','employee'); From d6027096799301eb9ccf2399b3cb0c107cbab967 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 11 Sep 2023 08:46:26 +0200 Subject: [PATCH 3/6] refs #4059 changes en la carpeta actual --- db/changes/232001/00-aclClient.sql | 40 ----------------------------- db/changes/232001/01-aclAccount.sql | 13 ---------- 2 files changed, 53 deletions(-) delete mode 100644 db/changes/232001/00-aclClient.sql delete mode 100644 db/changes/232001/01-aclAccount.sql diff --git a/db/changes/232001/00-aclClient.sql b/db/changes/232001/00-aclClient.sql deleted file mode 100644 index dec6f6136..000000000 --- a/db/changes/232001/00-aclClient.sql +++ /dev/null @@ -1,40 +0,0 @@ --- No encuentro este back -DELETE FROM salix.ACL WHERE property = 'activeWorkersWithRole'; -DELETE FROM salix.ACL WHERE model = 'Client' AND property = '*'; - -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Client','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Client','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Client','find','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Client','exists','READ','ALLOW','ROLE','employee'); - -DELETE FROM salix.ACL WHERE model = 'Client' AND accessType = '*' AND property IN ( - 'campaignMetricsEmail', - 'campaignMetricsPdf', - 'clientDebtStatementEmail', - 'clientDebtStatementHtml', - 'clientDebtStatementPdf', - 'clientWelcomeEmail', - 'clientWelcomeHtml', - 'consumptionSendQueued', - 'creditRequestEmail', - 'creditRequestHtml', - 'creditRequestPdf', - 'getClientOrSupplierReference', - 'incotermsAuthorizationEmail', - 'incotermsAuthorizationHtml', - 'incotermsAuthorizationPdf', - 'letterDebtorNdEmail', - 'letterDebtorNdHtml', - 'letterDebtorPdf', - 'letterDebtorStEmail', - 'letterDebtorStHtml', - 'printerSetupEmail', - 'printerSetupHtml', - 'sepaCoreEmail', - 'setPassword', - 'updateUser', - 'uploadFile'); \ No newline at end of file diff --git a/db/changes/232001/01-aclAccount.sql b/db/changes/232001/01-aclAccount.sql deleted file mode 100644 index f618ca842..000000000 --- a/db/changes/232001/01-aclAccount.sql +++ /dev/null @@ -1,13 +0,0 @@ -DELETE FROM salix.ACL WHERE model = 'Account' AND property = '*'; - -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Account','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Account','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Account','find','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Account','exists','READ','ALLOW','ROLE','employee'); - -DELETE FROM salix.ACL WHERE id=529; --- 529 VnUser changePassword WRITE ALLOW ROLE account \ No newline at end of file From 705505b931a3398b5406bb993d00c2610ffdb366 Mon Sep 17 00:00:00 2001 From: jgallego Date: Mon, 11 Sep 2023 16:24:47 +0200 Subject: [PATCH 4/6] fixes #4059 acl for address --- db/changes/233801/00-aclClient.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/changes/233801/00-aclClient.sql b/db/changes/233801/00-aclClient.sql index 5308dbbe2..8e85c027b 100644 --- a/db/changes/233801/00-aclClient.sql +++ b/db/changes/233801/00-aclClient.sql @@ -10,6 +10,8 @@ INSERT INTO salix.ACL (model,property,accessType,permission,principalType,princi VALUES ('Client','find','READ','ALLOW','ROLE','employee'); INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) VALUES ('Client','exists','READ','ALLOW','ROLE','employee'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Client','__get__addresses','READ','ALLOW','ROLE','employee'); DELETE FROM salix.ACL WHERE model = 'Client' AND property = '*' AND accessType IN ( 'campaignMetricsEmail', From 4e6808ec4aad00f121777076618bec717a669d32 Mon Sep 17 00:00:00 2001 From: jgallego Date: Thu, 21 Sep 2023 08:24:57 +0200 Subject: [PATCH 5/6] fixes #4059 muevo archivos a changes actual --- db/changes/{233801 => 234001}/00-aclClient.sql | 0 db/changes/{233801 => 234001}/01-aclAccount.sql | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename db/changes/{233801 => 234001}/00-aclClient.sql (100%) rename db/changes/{233801 => 234001}/01-aclAccount.sql (100%) diff --git a/db/changes/233801/00-aclClient.sql b/db/changes/234001/00-aclClient.sql similarity index 100% rename from db/changes/233801/00-aclClient.sql rename to db/changes/234001/00-aclClient.sql diff --git a/db/changes/233801/01-aclAccount.sql b/db/changes/234001/01-aclAccount.sql similarity index 100% rename from db/changes/233801/01-aclAccount.sql rename to db/changes/234001/01-aclAccount.sql From 4761b0f7840c78d0ce8fbef765feec97fc834d9a Mon Sep 17 00:00:00 2001 From: jgallego Date: Thu, 21 Sep 2023 10:41:20 +0200 Subject: [PATCH 6/6] =?UTF-8?q?fixes=20#4059=20a=C3=B1ado=20comillas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/changes/234001/00-aclClient.sql | 16 ++++++++-------- db/changes/234001/01-aclAccount.sql | 10 +++++----- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/db/changes/234001/00-aclClient.sql b/db/changes/234001/00-aclClient.sql index 8e85c027b..109b3a4fb 100644 --- a/db/changes/234001/00-aclClient.sql +++ b/db/changes/234001/00-aclClient.sql @@ -1,19 +1,19 @@ -- No encuentro este back -DELETE FROM salix.ACL WHERE property = 'activeWorkersWithRole'; -DELETE FROM salix.ACL WHERE model = 'Client' AND property = '*'; +DELETE FROM `salix`.`ACL` WHERE property = 'activeWorkersWithRole'; +DELETE FROM `salix`.`ACL` WHERE model = 'Client' AND property = '*'; -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Client','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Client','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Client','find','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Client','exists','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Client','__get__addresses','READ','ALLOW','ROLE','employee'); -DELETE FROM salix.ACL WHERE model = 'Client' AND property = '*' AND accessType IN ( +DELETE FROM `salix`.`ACL` WHERE model = 'Client' AND property = '*' AND accessType IN ( 'campaignMetricsEmail', 'campaignMetricsPdf', 'clientDebtStatementEmail', diff --git a/db/changes/234001/01-aclAccount.sql b/db/changes/234001/01-aclAccount.sql index 0f2d6d48c..d749b52ab 100644 --- a/db/changes/234001/01-aclAccount.sql +++ b/db/changes/234001/01-aclAccount.sql @@ -1,10 +1,10 @@ -DELETE FROM salix.ACL WHERE model = 'Account' AND property = '*' AND principalId = 'employee'; +DELETE FROM `salix`.`ACL` WHERE model = 'Account' AND property = '*' AND principalId = 'employee'; -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Account','findOne','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Account','findById','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Account','find','READ','ALLOW','ROLE','employee'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +INSERT INTO `salix`.`ACL` (model,property,accessType,permission,principalType,principalId) VALUES ('Account','exists','READ','ALLOW','ROLE','employee');