25 lines
916 B
SQL
25 lines
916 B
SQL
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'),
|
|
('Worker', 'updateAbsence', 'WRITE', 'ALLOW', 'ROLE', 'employee'),
|
|
('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;
|
|
|