fix(salix): refs #7648 #7648 improve update ACL
gitea/salix/pipeline/pr-master This commit looks good Details

This commit is contained in:
Javier Segarra 2024-07-19 11:54:21 +02:00
parent 376ddebdcd
commit 287f9edc83
1 changed files with 1 additions and 7 deletions

View File

@ -8,14 +8,8 @@ INSERT IGNORE INTO salix.ACL (`model`,`property`,`accessType`,`permission`,`prin
INSERT IGNORE INTO salix.ACL (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`) INSERT IGNORE INTO salix.ACL (`model`,`property`,`accessType`,`permission`,`principalType`,`principalId`)
VALUES ('Entry','buyLabel','READ','ALLOW','ROLE','supplier'); VALUES ('Entry','buyLabel','READ','ALLOW','ROLE','supplier');
INSERT IGNORE INTO `account`.`role` (`name`,`description`,`hasLogin`,`created`,`modified`)
VALUES ('supplier','Proveedores',1,'2017-10-10 14:58:58.000','2017-10-10 14:59:20.000');
SET @supplierFk =LAST_INSERT_ID();
INSERT IGNORE INTO account.roleInherit (`role`,`inheritsFrom`)
VALUES (@supplierFk,2);
UPDATE salix.ACL UPDATE salix.ACL
SET principalId='$authenticated' SET principalId='$authenticated'
WHERE id=264; WHERE id=(SELECT id FROM salix.ACL WHERE model='StarredModule' and property='*' and `accessType`='*' );