refs #5881 createRolAndGrantAcl #1715
|
@ -0,0 +1,32 @@
|
|||
INSERT INTO `account`.`role` (`id`, `name`, `description`, `hasLogin`)
|
||||
VALUES ('claimViewer','Trabajadores que consulta las reclamaciones ',1);
|
||||
pablone marked this conversation as resolved
Outdated
|
||||
|
||||
INSERT INTO `account`.`roleInherit` (`role`,`inheritsFrom`)
|
||||
pablone marked this conversation as resolved
alexm
commented
Molt bona! Molt bona!
|
||||
SELECT `r`.`id`, `r2`.`id`
|
||||
pablone marked this conversation as resolved
Outdated
alexm
commented
Mira si pots traure el id dinamicament, sino si quan pujes, algu ja ha fet un rol nou te fallara el insert id 122 Mira si pots traure el id dinamicament, sino si quan pujes, algu ja ha fet un rol nou te fallara el insert id 122
|
||||
FROM `account`.`role` `r`
|
||||
JOIN `account`.`role` `r2` ON `r2`.`name` = 'claimViewer'
|
||||
WHERE `r`.`name` IN (
|
||||
'salesPerson',
|
||||
'buyer',
|
||||
'deliveryBoss',
|
||||
'handmadeBoss'
|
||||
)
|
||||
|
||||
DELETE FROM `salix`.`ACL`
|
||||
WHERE `model`= 'claim'
|
||||
AND `property` IN (
|
||||
'filter',
|
||||
'find',
|
||||
'findById',
|
||||
'getSummary'
|
||||
);
|
||||
|
||||
INSERT INTO `salix`.`ACL` (`model`,`property`,`accessType`,`permission`,`principalType`,`principalid`)
|
||||
pablone marked this conversation as resolved
alexm
commented
Asi igual te has rallat un poc no?? Asi igual te has rallat un poc no??
Si haveres ficat els 4 insert jo crec que quedava mes clar i te lleves el select no?
|
||||
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');
|
||||
|
Loading…
Reference in New Issue
LLeva el id