2023-01-03 13:50:29 +00:00
|
|
|
UPDATE `salix`.`ACL`
|
|
|
|
SET accessType='READ'
|
|
|
|
WHERE model='Worker'
|
|
|
|
AND property='*'
|
|
|
|
AND accessType='*'
|
|
|
|
AND permission='ALLOW'
|
|
|
|
AND principalType='ROLE'
|
|
|
|
AND principalId='employee';
|
|
|
|
|
|
|
|
|
|
|
|
INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`)
|
|
|
|
VALUES
|
|
|
|
('Worker', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'hr'),
|
|
|
|
('Worker', 'createAbsence', '*', 'ALLOW', 'ROLE', 'employee'),
|
2023-01-04 08:23:18 +00:00
|
|
|
('Worker', 'updateAbsence', 'WRITE', 'ALLOW', 'ROLE', 'employee'),
|
2023-01-03 13:50:29 +00:00
|
|
|
('Worker', 'deleteAbsence', '*', 'ALLOW', 'ROLE', 'employee'),
|
|
|
|
('Worker', 'new', 'WRITE', 'ALLOW', 'ROLE', 'hr'),
|
|
|
|
('Role', '*', 'READ', 'ALLOW', 'ROLE', 'hr');
|
|
|
|
|
2023-01-16 11:19:03 +00:00
|
|
|
ALTER TABLE `vn`.`workerConfig` ADD roleFk int(10) unsigned NOT NULL COMMENT 'Rol por defecto al dar de alta un trabajador nuevo';
|
|
|
|
UPDATE `vn`.`workerConfig`
|
|
|
|
SET roleFk = 1
|
|
|
|
WHERE id = 1;
|
|
|
|
|