diff --git a/db/versions/11404-azureAnthurium/00-firstScript.sql b/db/versions/11404-azureAnthurium/00-firstScript.sql index 7a4dfe9bc..58e74cbfb 100644 --- a/db/versions/11404-azureAnthurium/00-firstScript.sql +++ b/db/versions/11404-azureAnthurium/00-firstScript.sql @@ -1,2 +1,6 @@ INSERT INTO salix.ACL (model, property, accessType, permission, principalType, principalId) -VALUES('WorkerDms', 'hasHighPrivs', 'READ', 'ALLOW', 'ROLE', 'hr'); \ No newline at end of file +VALUES + ('WorkerDms', 'hasHighPrivs', 'READ', 'ALLOW', 'ROLE', 'hr'), + ('Business', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'hr'), + ('Worker', '__get__business', 'READ', 'ALLOW', 'ROLE', 'hr') + ; \ No newline at end of file diff --git a/modules/worker/back/models/worker.json b/modules/worker/back/models/worker.json index 705851963..fbba4c227 100644 --- a/modules/worker/back/models/worker.json +++ b/modules/worker/back/models/worker.json @@ -142,6 +142,11 @@ "type": "hasMany", "model": "WorkerRelative", "foreignKey": "workerFK" + }, + "business": { + "type": "hasMany", + "model": "Business", + "foreignKey": "workerFk" } }, "acls": [