From 1a01b3e58795f1b17993d4d6b8a8a9e5ac82b33c Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 10 Jun 2024 10:42:52 +0200 Subject: [PATCH 1/8] refs #7529 back models acls --- .../11094-maroonCyca/00-firstScript.sql | 8 +++ modules/worker/back/model-config.json | 9 +++ .../worker/back/models/disability-grade.json | 18 ++++++ modules/worker/back/models/worker-irpf.json | 60 +++++++++++++++++++ .../worker/back/models/worker-relatives.json | 53 ++++++++++++++++ 5 files changed, 148 insertions(+) create mode 100644 db/versions/11094-maroonCyca/00-firstScript.sql create mode 100644 modules/worker/back/models/disability-grade.json create mode 100644 modules/worker/back/models/worker-irpf.json create mode 100644 modules/worker/back/models/worker-relatives.json diff --git a/db/versions/11094-maroonCyca/00-firstScript.sql b/db/versions/11094-maroonCyca/00-firstScript.sql new file mode 100644 index 000000000..dfaf5b79e --- /dev/null +++ b/db/versions/11094-maroonCyca/00-firstScript.sql @@ -0,0 +1,8 @@ +-- Place your SQL code here +-- Auto-generated SQL script #202406101036 +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Worker','workerRelatives','*','ALLOW','ROLE','hr'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Worker','workerIrpf','*','ALLOW','ROLE','hr'); +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES ('Worker','disabilityGrade','*','ALLOW','ROLE','hr'); diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json index b7c355511..e58685123 100644 --- a/modules/worker/back/model-config.json +++ b/modules/worker/back/model-config.json @@ -124,6 +124,15 @@ }, "Locker": { "dataSource": "vn" + }, + "WorkerIrpf": { + "dataSource": "vn" + }, + "DisabilityGrade": { + "dataSource": "vn" + }, + "WorkerRelatives": { + "dataSource": "vn" } } diff --git a/modules/worker/back/models/disability-grade.json b/modules/worker/back/models/disability-grade.json new file mode 100644 index 000000000..506138225 --- /dev/null +++ b/modules/worker/back/models/disability-grade.json @@ -0,0 +1,18 @@ +{ + "name": "DisabilityGrade", + "base": "VnModel", + "options": { + "mysql": { + "table": "disabilityGrade" + } + }, + "properties": { + "id": { + "id": true, + "type": "number" + }, + "description": { + "type": "string" + } + } +} diff --git a/modules/worker/back/models/worker-irpf.json b/modules/worker/back/models/worker-irpf.json new file mode 100644 index 000000000..034bed368 --- /dev/null +++ b/modules/worker/back/models/worker-irpf.json @@ -0,0 +1,60 @@ +{ + "name": "WorkerIrpf", + "description": "Model 145 IRPF", + "base": "VnModel", + "options": { + "mysql": { + "table": "workerIrpf" + } + }, + "properties": { + "workerFk": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "spouseNif": { + "type": "string" + }, + "geographicMobilityDate": { + "type": "date" + }, + "disabilityGradeFk": { + "type" : "number" + }, + "isDependent": { + "type" : "number" + }, + "familySituation": { + "type" : "number" + }, + "spousePension": { + "type" : "number" + }, + "childPension": { + "type" : "number" + }, + "hasHousingPaymentBefore": { + "type" : "number" + }, + "hasHousingPaymentAfter": { + "type" : "number" + }, + "updated": { + "type" : "date" + } + + }, + "relations": { + "disabilityGrade": { + "type": "belongsTo", + "model": "disabilityGrade", + "foreignKey": "disabilityGradeFk" + }, + "worker": { + "type": "belongsTo", + "model": "VnUser", + "foreignKey": "workerFK" + } + } +} diff --git a/modules/worker/back/models/worker-relatives.json b/modules/worker/back/models/worker-relatives.json new file mode 100644 index 000000000..2429a2f1c --- /dev/null +++ b/modules/worker/back/models/worker-relatives.json @@ -0,0 +1,53 @@ +{ + "name": "WorkerRelatives", + "description": "Model 145 IRPF", + "base": "VnModel", + "options": { + "mysql": { + "table": "workerRelatives" + } + }, + "properties": { + "id": { + "type": "number", + "id": true, + "description": "Identifier" + }, + "workerFk": { + "type": "number" + }, + "isDescendant": { + "type": "number" + }, + "disabilityGradeFk": { + "type" : "number" + }, + "birthed": { + "type" : "number" + }, + "adoptionYear": { + "type" : "number" + }, + "isDependend": { + "type" : "boolean" + }, + "islointCustody": { + "type" : "boolean" + }, + "updated": { + "type" : "date" + } + }, + "relations": { + "disabilityGrade": { + "type": "belongsTo", + "model": "disabilityGrade", + "foreignKey": "disabilityGradeFk" + }, + "worker": { + "type": "belongsTo", + "model": "WorkerIrpf", + "foreignKey": "workerFK" + } + } +} -- 2.40.1 From 5da6c09f6808794778ad36629e6342c29e91da66 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 18 Sep 2024 12:08:49 +0200 Subject: [PATCH 2/8] fix: refs #7529 workerPit --- db/versions/11094-maroonCyca/00-firstScript.sql | 8 -------- .../11245-turquoiseAnthurium/00-firstScript.sql | 15 +++++++++++++++ modules/worker/back/model-config.json | 2 +- modules/worker/back/models/worker-irpf.json | 2 +- modules/worker/back/models/worker-relatives.json | 8 ++++---- modules/worker/back/models/worker.json | 12 +++++++++++- 6 files changed, 32 insertions(+), 15 deletions(-) delete mode 100644 db/versions/11094-maroonCyca/00-firstScript.sql create mode 100644 db/versions/11245-turquoiseAnthurium/00-firstScript.sql diff --git a/db/versions/11094-maroonCyca/00-firstScript.sql b/db/versions/11094-maroonCyca/00-firstScript.sql deleted file mode 100644 index dfaf5b79e..000000000 --- a/db/versions/11094-maroonCyca/00-firstScript.sql +++ /dev/null @@ -1,8 +0,0 @@ --- Place your SQL code here --- Auto-generated SQL script #202406101036 -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Worker','workerRelatives','*','ALLOW','ROLE','hr'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Worker','workerIrpf','*','ALLOW','ROLE','hr'); -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES ('Worker','disabilityGrade','*','ALLOW','ROLE','hr'); diff --git a/db/versions/11245-turquoiseAnthurium/00-firstScript.sql b/db/versions/11245-turquoiseAnthurium/00-firstScript.sql new file mode 100644 index 000000000..6381f5db4 --- /dev/null +++ b/db/versions/11245-turquoiseAnthurium/00-firstScript.sql @@ -0,0 +1,15 @@ +ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; +ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; + +RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; + +ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; +ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; + + +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES + ('Worker','workerRelative','*','ALLOW','ROLE','hr'), + ('Worker','workerIrpf','*','ALLOW','ROLE','hr'), + ('Worker','disabilityGrade','*','ALLOW','ROLE','hr'); + diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json index eb3e573e1..dc078f4d0 100644 --- a/modules/worker/back/model-config.json +++ b/modules/worker/back/model-config.json @@ -131,7 +131,7 @@ "DisabilityGrade": { "dataSource": "vn" }, - "WorkerRelatives": { + "WorkerRelative": { "dataSource": "vn" }, "MedicalReview": { diff --git a/modules/worker/back/models/worker-irpf.json b/modules/worker/back/models/worker-irpf.json index 034bed368..44bd9713c 100644 --- a/modules/worker/back/models/worker-irpf.json +++ b/modules/worker/back/models/worker-irpf.json @@ -22,7 +22,7 @@ "disabilityGradeFk": { "type" : "number" }, - "isDependent": { + "isDependend": { "type" : "number" }, "familySituation": { diff --git a/modules/worker/back/models/worker-relatives.json b/modules/worker/back/models/worker-relatives.json index 2429a2f1c..0815f7330 100644 --- a/modules/worker/back/models/worker-relatives.json +++ b/modules/worker/back/models/worker-relatives.json @@ -1,10 +1,10 @@ { - "name": "WorkerRelatives", + "name": "WorkerRelative", "description": "Model 145 IRPF", "base": "VnModel", "options": { "mysql": { - "table": "workerRelatives" + "table": "workerRelative" } }, "properties": { @@ -31,7 +31,7 @@ "isDependend": { "type" : "boolean" }, - "islointCustody": { + "isJointCustody": { "type" : "boolean" }, "updated": { @@ -46,7 +46,7 @@ }, "worker": { "type": "belongsTo", - "model": "WorkerIrpf", + "model": "VnUser", "foreignKey": "workerFK" } } diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 21c5bd10f..568d23b91 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -135,6 +135,16 @@ "type": "hasMany", "model": "WorkerTimeControlMail", "foreignKey": "workerFk" + }, + "irpf": { + "type": "hasMany", + "model": "WorkerIrpf", + "foreignKey": "workerFk" + }, + "workerRelative": { + "type": "hasMany", + "model": "WorkerRelative", + "foreignKey": "workerFK" } }, "acls": [ @@ -207,4 +217,4 @@ ] } } -} \ No newline at end of file +} -- 2.40.1 From 903d85a2439d10eb2d6b1a51a16feb382770ed49 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 18 Oct 2024 14:06:39 +0200 Subject: [PATCH 3/8] fix: refs #7529 fix back --- .../00-firstScript.sql | 20 +++++++++---------- .../11312-navyAralia/00-firstScript.sql | 15 ++++++++++++++ 2 files changed, 25 insertions(+), 10 deletions(-) create mode 100644 db/versions/11312-navyAralia/00-firstScript.sql diff --git a/db/versions/11245-turquoiseAnthurium/00-firstScript.sql b/db/versions/11245-turquoiseAnthurium/00-firstScript.sql index 6381f5db4..f1c4d9471 100644 --- a/db/versions/11245-turquoiseAnthurium/00-firstScript.sql +++ b/db/versions/11245-turquoiseAnthurium/00-firstScript.sql @@ -1,15 +1,15 @@ -ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; -ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; +-- ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; +-- ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; -RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; +-- RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; -ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; -ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; +-- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; +-- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; -INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) - VALUES - ('Worker','workerRelative','*','ALLOW','ROLE','hr'), - ('Worker','workerIrpf','*','ALLOW','ROLE','hr'), - ('Worker','disabilityGrade','*','ALLOW','ROLE','hr'); +-- INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) +-- VALUES +-- ('workerRelative','*','*','ALLOW','ROLE','hr'), +-- ('workerIrpf','*','*','ALLOW','ROLE','hr'), +-- ('disabilityGrade','*','*','ALLOW','ROLE','hr'); diff --git a/db/versions/11312-navyAralia/00-firstScript.sql b/db/versions/11312-navyAralia/00-firstScript.sql new file mode 100644 index 000000000..0d58503bb --- /dev/null +++ b/db/versions/11312-navyAralia/00-firstScript.sql @@ -0,0 +1,15 @@ +ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; +ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; + +-- RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; + +-- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; +-- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; + + +INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) + VALUES + ('workerRelatives','*','*','ALLOW','ROLE','hr'), + ('workerIrpf','*','*','ALLOW','ROLE','hr'), + ('disabilityGrade','*','*','ALLOW','ROLE','hr'); + -- 2.40.1 From 6b10f60933f4c9bda512053aa32d1c3ce9f4fb15 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 29 Oct 2024 08:03:18 +0100 Subject: [PATCH 4/8] fix: refs #7529 mod model --- modules/worker/back/models/worker-relatives.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/worker/back/models/worker-relatives.json b/modules/worker/back/models/worker-relatives.json index 0815f7330..532a9446c 100644 --- a/modules/worker/back/models/worker-relatives.json +++ b/modules/worker/back/models/worker-relatives.json @@ -4,7 +4,7 @@ "base": "VnModel", "options": { "mysql": { - "table": "workerRelative" + "table": "workerRelatives" } }, "properties": { -- 2.40.1 From e0e487859fcbbe8adbc1f38f9d1bb39ed62cf6d3 Mon Sep 17 00:00:00 2001 From: carlossa Date: Tue, 29 Oct 2024 13:59:47 +0100 Subject: [PATCH 5/8] fix: refs #7529 fix models --- db/dump/fixtures.before.sql | 6 ++++++ modules/worker/back/models/worker-irpf.json | 7 +------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/db/dump/fixtures.before.sql b/db/dump/fixtures.before.sql index 595027b09..dd4bc7881 100644 --- a/db/dump/fixtures.before.sql +++ b/db/dump/fixtures.before.sql @@ -4007,4 +4007,10 @@ INSERT IGNORE INTO pbx.queueMember UPDATE vn.department SET pbxQueue = '1000' WHERE name = "CAMARA"; UPDATE vn.department SET pbxQueue = '2000' WHERE name = "VENTAS"; +INSERT INTO vn.workerRelatives (workerFk, isDescendant, disabilityGradeFk, birthed, adoptionYear, isDependend, isJointCustody, updated) + VALUES + (1106, 1, NULL, 0, NULL, 0, 0, '2024-10-29 08:42:44.000'); +INSERT INTO vn.workerIrpf (workerFk,spouseNif,geographicMobilityDate) + VALUES + (1106,'26493101E','2019-09-20'); diff --git a/modules/worker/back/models/worker-irpf.json b/modules/worker/back/models/worker-irpf.json index 44bd9713c..65f72a1fd 100644 --- a/modules/worker/back/models/worker-irpf.json +++ b/modules/worker/back/models/worker-irpf.json @@ -10,7 +10,7 @@ "properties": { "workerFk": { "type": "number", - "id": true, + "id": 1, "description": "Identifier" }, "spouseNif": { @@ -50,11 +50,6 @@ "type": "belongsTo", "model": "disabilityGrade", "foreignKey": "disabilityGradeFk" - }, - "worker": { - "type": "belongsTo", - "model": "VnUser", - "foreignKey": "workerFK" } } } -- 2.40.1 From fa108e2af01637a7552d9364ca4838eac6302769 Mon Sep 17 00:00:00 2001 From: carlossa Date: Fri, 8 Nov 2024 11:56:17 +0100 Subject: [PATCH 6/8] fix: refs #7529 fix sql --- .../11245-turquoiseAnthurium/00-firstScript.sql | 15 --------------- db/versions/11312-navyAralia/00-firstScript.sql | 12 +++--------- 2 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 db/versions/11245-turquoiseAnthurium/00-firstScript.sql diff --git a/db/versions/11245-turquoiseAnthurium/00-firstScript.sql b/db/versions/11245-turquoiseAnthurium/00-firstScript.sql deleted file mode 100644 index f1c4d9471..000000000 --- a/db/versions/11245-turquoiseAnthurium/00-firstScript.sql +++ /dev/null @@ -1,15 +0,0 @@ --- ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; --- ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; - --- RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; - --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; - - --- INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) --- VALUES --- ('workerRelative','*','*','ALLOW','ROLE','hr'), --- ('workerIrpf','*','*','ALLOW','ROLE','hr'), --- ('disabilityGrade','*','*','ALLOW','ROLE','hr'); - diff --git a/db/versions/11312-navyAralia/00-firstScript.sql b/db/versions/11312-navyAralia/00-firstScript.sql index 0d58503bb..446c7d4fe 100644 --- a/db/versions/11312-navyAralia/00-firstScript.sql +++ b/db/versions/11312-navyAralia/00-firstScript.sql @@ -1,15 +1,9 @@ ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_disabilityGradeFk; ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; --- RENAME TABLE `vn`.`workerRelatives` TO `vn`.`workerRelative`; - --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_disabilityGradeFk` FOREIGN KEY (`disabilityGradeFk`) REFERENCES `disabilityGrade` (`id`) ON UPDATE CASCADE; --- ALTER TABLE vn.workerRelative ADD CONSTRAINT `workerRelatives_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `workerIrpf` (`workerFk`) ON DELETE CASCADE ON UPDATE CASCADE; - - INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) VALUES - ('workerRelatives','*','*','ALLOW','ROLE','hr'), - ('workerIrpf','*','*','ALLOW','ROLE','hr'), - ('disabilityGrade','*','*','ALLOW','ROLE','hr'); + ('WorkerRelative','*','*','ALLOW','ROLE','hr'), + ('WorkerIrpf','*','*','ALLOW','ROLE','hr'), + ('DisabilityGrade','*','*','ALLOW','ROLE','hr'); -- 2.40.1 From 2790e9274124764dcb70408d9c0ac99f1afd8d6f Mon Sep 17 00:00:00 2001 From: carlossa Date: Mon, 18 Nov 2024 13:57:40 +0100 Subject: [PATCH 7/8] fix: refs #7529 fix acl --- db/versions/11312-navyAralia/00-firstScript.sql | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/db/versions/11312-navyAralia/00-firstScript.sql b/db/versions/11312-navyAralia/00-firstScript.sql index 446c7d4fe..decabc421 100644 --- a/db/versions/11312-navyAralia/00-firstScript.sql +++ b/db/versions/11312-navyAralia/00-firstScript.sql @@ -3,7 +3,16 @@ ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) VALUES - ('WorkerRelative','*','*','ALLOW','ROLE','hr'), - ('WorkerIrpf','*','*','ALLOW','ROLE','hr'), - ('DisabilityGrade','*','*','ALLOW','ROLE','hr'); + ('WorkerRelative','updateAttributes','*','ALLOW','ROLE','hr'), + ('WorkerRelative','forceIsSubordinate','*','ALLOW','ROLE','hr'), + ('WorkerRelative','new','*','ALLOW','ROLE','hr'), + ('WorkerRelative','updloadFile','*','ALLOW','ROLE','hr'), + ('WorkerIrpf','updateAttributes','*','ALLOW','ROLE','hr'), + ('WorkerIrpf','forceIsSubordinate','*','ALLOW','ROLE','hr'), + ('WorkerIrpf','new','*','ALLOW','ROLE','hr'), + ('WorkerIrpf','updloadFile','*','ALLOW','ROLE','hr'), + ('DisabilityGrade','updateAttributes','*','ALLOW','ROLE','hr'), + ('DisabilityGrade','forceIsSubordinate','*','ALLOW','ROLE','hr'), + ('DisabilityGrade','updloadFile','*','ALLOW','ROLE','hr'), + ('DisabilityGrade','new','*','ALLOW','ROLE','hr'); -- 2.40.1 From df249b05d33474e3540a6981aec1beed8f3e5194 Mon Sep 17 00:00:00 2001 From: carlossa Date: Wed, 20 Nov 2024 13:10:43 +0100 Subject: [PATCH 8/8] fix: refs #7529 fix acl --- db/versions/11312-navyAralia/00-firstScript.sql | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/db/versions/11312-navyAralia/00-firstScript.sql b/db/versions/11312-navyAralia/00-firstScript.sql index decabc421..466b18f6b 100644 --- a/db/versions/11312-navyAralia/00-firstScript.sql +++ b/db/versions/11312-navyAralia/00-firstScript.sql @@ -4,15 +4,12 @@ ALTER TABLE vn.workerRelatives DROP FOREIGN KEY workerRelatives_workerFk; INSERT INTO salix.ACL (model,property,accessType,permission,principalType,principalId) VALUES ('WorkerRelative','updateAttributes','*','ALLOW','ROLE','hr'), - ('WorkerRelative','forceIsSubordinate','*','ALLOW','ROLE','hr'), - ('WorkerRelative','new','*','ALLOW','ROLE','hr'), - ('WorkerRelative','updloadFile','*','ALLOW','ROLE','hr'), + ('WorkerRelative','crud','WRITE','ALLOW','ROLE','hr'), + ('WorkerRelative','findById','*','ALLOW','ROLE','hr'), ('WorkerIrpf','updateAttributes','*','ALLOW','ROLE','hr'), - ('WorkerIrpf','forceIsSubordinate','*','ALLOW','ROLE','hr'), - ('WorkerIrpf','new','*','ALLOW','ROLE','hr'), - ('WorkerIrpf','updloadFile','*','ALLOW','ROLE','hr'), + ('WorkerIrpf','crud','*','ALLOW','ROLE','hr'), + ('WorkerRelative','findById','*','ALLOW','ROLE','hr'), ('DisabilityGrade','updateAttributes','*','ALLOW','ROLE','hr'), - ('DisabilityGrade','forceIsSubordinate','*','ALLOW','ROLE','hr'), - ('DisabilityGrade','updloadFile','*','ALLOW','ROLE','hr'), - ('DisabilityGrade','new','*','ALLOW','ROLE','hr'); + ('DisabilityGrade','crud','*','ALLOW','ROLE','hr'), + ('DisabilityGrade','findById','*','ALLOW','ROLE','hr'); -- 2.40.1