salix/db/changes/234601/00-claimViewerAcl.sql

32 lines
1.2 KiB
MySQL
Raw Normal View History

2023-09-07 09:02:47 +00:00
INSERT INTO `account`.`role` (`name`, `description`, `hasLogin`)
2023-08-24 08:04:32 +00:00
VALUES ('claimViewer','Trabajadores que consulta las reclamaciones ',1);
2023-08-24 06:05:27 +00:00
INSERT INTO `account`.`roleInherit` (`role`,`inheritsFrom`)
2023-08-24 08:04:32 +00:00
SELECT `r`.`id`, `r2`.`id`
FROM `account`.`role` `r`
JOIN `account`.`role` `r2` ON `r2`.`name` = 'claimViewer'
WHERE `r`.`name` IN (
'salesPerson',
'buyer',
'deliveryBoss',
'handmadeBoss'
2023-09-07 09:02:47 +00:00
);
2023-08-24 06:05:27 +00:00
DELETE FROM `salix`.`ACL`
WHERE `model`= 'claim'
2023-08-24 08:04:32 +00:00
AND `property` IN (
'filter',
'find',
'findById',
'getSummary'
);
2023-08-24 06:05:27 +00:00
2023-11-09 08:05:56 +00:00
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
2023-08-24 09:31:12 +00:00
VALUES ('Claim','filter','READ','ALLOW','ROLE','claimViewer');
2023-11-09 08:05:56 +00:00
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
2023-08-24 09:31:12 +00:00
VALUES ('Claim','find','READ','ALLOW','ROLE','claimViewer');
2023-11-09 08:05:56 +00:00
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
2023-08-24 09:31:12 +00:00
VALUES ('Claim','findById','READ','ALLOW','ROLE','claimViewer');
2023-11-09 08:05:56 +00:00
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
VALUES ('Claim','getSummary','READ','ALLOW','ROLE','claimViewer');