salix/db/.archive/230401/00-createWorker.sql

25 lines
916 B
MySQL
Raw Normal View History

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');
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;