From 470f511b3048b8bedebc18085afd148f73038668 Mon Sep 17 00:00:00 2001 From: pablone Date: Thu, 24 Aug 2023 08:05:27 +0200 Subject: [PATCH] refs #5881 createRolAndGrantAcl --- db/changes/233601/00-createClaimReader.sql | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 db/changes/233601/00-createClaimReader.sql diff --git a/db/changes/233601/00-createClaimReader.sql b/db/changes/233601/00-createClaimReader.sql new file mode 100644 index 000000000..10ab03d29 --- /dev/null +++ b/db/changes/233601/00-createClaimReader.sql @@ -0,0 +1,33 @@ +INSERT INTO `account`.`role` (`id`, `name`, `description`, `hasLogin`) + VALUES (122, 'claimViewer','Trabajadores que consulta las reclamaciones ',1); + +INSERT INTO `account`.`roleInherit` (`role`,`inheritsFrom`) + VALUES (35, 122); +INSERT INTO `account`.`roleInherit` (`role`,`inheritsFrom`) + VALUES (18, 122); +INSERT INTO `account`.`roleInherit` (`role`,`inheritsFrom`) + VALUES (41, 122); +INSERT INTO `account`.`roleInherit` (`role`,`inheritsFrom`) + VALUES (57, 122); + +DELETE FROM `salix`.`ACL` + WHERE `model`= 'claim' + AND `property` = 'filter'; +DELETE FROM `salix`.`ACL` + WHERE `model`= 'claim' + AND `property` = 'find'; +DELETE FROM `salix`.`ACL` + WHERE `model`= 'claim' + AND `property` = 'findById'; +DELETE FROM `salix`.`ACL` + WHERE `model`= 'claim' + AND `property` = 'getSummary'; + +INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`) + VALUES ('Claim','filter','READ','ALLOW','ROLE','claimViewer'); +INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`) + VALUES ('Claim','find','READ','ALLOW','ROLE','claimViewer'); +INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`) + VALUES ('Claim','findById','READ','ALLOW','ROLE','claimViewer'); +INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`) + VALUES ('Claim','getSummary','READ','ALLOW','ROLE','claimViewer');