From a345265a89096b66ff8e7942e0fdaa24e87148b9 Mon Sep 17 00:00:00 2001 From: alexm Date: Wed, 10 May 2023 14:09:06 +0200 Subject: [PATCH] refs #5488 specifics acls --- db/changes/232001/00-useSpecificsAcls.sql | 30 ++++++++++++----------- loopback/locale/en.json | 5 ++-- 2 files changed, 19 insertions(+), 16 deletions(-) diff --git a/db/changes/232001/00-useSpecificsAcls.sql b/db/changes/232001/00-useSpecificsAcls.sql index f8bd84c01..d79c9d4d9 100644 --- a/db/changes/232001/00-useSpecificsAcls.sql +++ b/db/changes/232001/00-useSpecificsAcls.sql @@ -43,10 +43,11 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri ('Claim', 'findOne', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Claim', 'getSummary', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Claim', 'updateClaim', 'WRITE', 'ALLOW', 'ROLE', 'employee'), - ('Claim', 'regularizeClaim', 'WRITE', 'ALLOW', 'ROLE', 'claimManager'),-- ? - ('Claim', 'updateClaimDestination', 'WRITE', 'ALLOW', 'ROLE', 'claimManager'),-- ? - ('Claim', 'downloadFile', 'READ', 'ALLOW', 'ROLE', 'claimManager'),-- ? - ('Claim', 'logs', 'READ', 'ALLOW', 'ROLE', 'claimManager');-- ? + ('Claim', 'regularizeClaim', 'WRITE', 'ALLOW', 'ROLE', 'claimManager'), + ('Claim', 'updateClaimDestination', 'WRITE', 'ALLOW', 'ROLE', 'claimManager'), + ('Claim', 'downloadFile', 'READ', 'ALLOW', 'ROLE', 'claimManager'), + ('Claim', 'deleteById', 'WRITE', 'ALLOW', 'ROLE', 'claimManager'), + ('Claim', 'logs', 'READ', 'ALLOW', 'ROLE', 'claimManager'); DELETE FROM `salix`.`ACL` WHERE @@ -62,7 +63,7 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri ('Ticket', 'getVolume', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Ticket', 'getTotalVolume', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Ticket', 'summary', 'READ', 'ALLOW', 'ROLE', 'employee'), - ('Ticket', 'priceDifference', 'WRITE', 'ALLOW', 'ROLE', 'employee'), + ('Ticket', 'priceDifference', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Ticket', 'componentUpdate', 'WRITE', 'ALLOW', 'ROLE', 'employee'), ('Ticket', 'new', 'WRITE', 'ALLOW', 'ROLE', 'employee'), ('Ticket', 'isEditable', 'READ', 'ALLOW', 'ROLE', 'employee'), @@ -79,6 +80,7 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri ('Ticket', 'isLocked', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Ticket', 'freightCost', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Ticket', 'getComponentsSum', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Ticket', 'updateAttributes', 'WRITE', 'ALLOW', 'ROLE', 'delivery'), -- Change Priority in Route tickets ('Ticket', 'deliveryNoteCsv', 'READ', 'ALLOW', 'ROLE', 'employee'); DELETE FROM `salix`.`ACL` @@ -104,12 +106,12 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri ('Worker', 'find', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Worker', 'findById', 'READ', 'ALLOW', 'ROLE', 'employee'), ('Worker', 'findOne', 'READ', 'ALLOW', 'ROLE', 'employee'), - ('Worker', 'filter', 'READ', 'ALLOW', 'ROLE', 'employee'), -- ? - ('Worker', 'getWorkedHours', 'READ', 'ALLOW', 'ROLE', 'employee'), -- ? - ('Worker', 'active', 'READ', 'ALLOW', 'ROLE', 'employee'), -- ? - ('Worker', 'activeWithRole', 'READ', 'ALLOW', 'ROLE', 'employee'), -- ? - ('Worker', 'uploadFile', 'WRITE', 'ALLOW', 'ROLE', 'hr'), -- ? - ('Worker', 'contracts', 'READ', 'ALLOW', 'ROLE', 'employee'), -- ? - ('Worker', 'holidays', 'READ', 'ALLOW', 'ROLE', 'employee'), -- ? - ('Worker', 'activeContract', 'READ', 'ALLOW', 'ROLE', 'employee'), -- ? - ('Worker', 'activeWithInheritedRole', 'READ', 'ALLOW', 'ROLE', 'employee'); --? + ('Worker', 'filter', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'getWorkedHours', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'active', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'activeWithRole', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'uploadFile', 'WRITE', 'ALLOW', 'ROLE', 'hr'), + ('Worker', 'contracts', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'holidays', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'activeContract', 'READ', 'ALLOW', 'ROLE', 'employee'), + ('Worker', 'activeWithInheritedRole', 'READ', 'ALLOW', 'ROLE', 'employee'); diff --git a/loopback/locale/en.json b/loopback/locale/en.json index cffedd891..a517a6183 100644 --- a/loopback/locale/en.json +++ b/loopback/locale/en.json @@ -171,5 +171,6 @@ "Added observation": "Added observation", "Comment added to client": "Comment added to client", "This ticket is already a refund": "This ticket is already a refund", - "A claim with that sale already exists": "A claim with that sale already exists" -} \ No newline at end of file + "A claim with that sale already exists": "A claim with that sale already exists", + "ASSIGN_ZONE_FIRST": "Assign zone first" +}