Skip to content

Commit

Permalink
uscr permissions (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
janorivera authored Dec 12, 2024
1 parent 85f3495 commit 4cca7d9
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
37 changes: 37 additions & 0 deletions hrm-domain/hrm-core/permission-rules/uscr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"viewCase": [["isSupervisor"], ["isCreator"]],
"closeCase": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"reopenCase": [["isSupervisor"]],
"caseStatusTransition": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"addNote": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"editNote": [["isSupervisor"]],
"addReferral": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"editReferral": [["isSupervisor"]],
"addHousehold": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"editHousehold": [["isSupervisor"]],
"addPerpetrator": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"editPerpetrator": [["isSupervisor"]],
"addIncident": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"editIncident": [["isSupervisor"]],
"addDocument": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"editDocument": [["isSupervisor"]],
"editCaseOverview": [["isSupervisor"], ["isCreator", "isCaseOpen"]],
"updateCaseContacts": [["isSupervisor"], ["isCaseOpen"]],

"viewContact": [["everyone"]],
"editContact": [["isSupervisor"], ["isOwner"]],
"editInProgressContact": [["isSupervisor"], ["isOwner"]],
"viewExternalTranscript": [["everyone"]],
"viewRecording": [],
"addContactToCase": [["isSupervisor"], ["isOwner"]],
"removeContactFromCase": [["isSupervisor"], ["isOwner"]],

"viewProfile": [["everyone"]],
"flagProfile": [["isSupervisor"]],
"unflagProfile": [["isSupervisor"]],
"viewProfileSection": [["everyone", { "sectionType": "summary" }], ["isSupervisor"]],
"createProfileSection": [["isSupervisor"]],
"editProfileSection": [["isSupervisor"]],

"viewPostSurvey": [["isSupervisor"]]
}
2 changes: 2 additions & 0 deletions hrm-domain/hrm-core/permissions/rulesMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const mwRules = require('../permission-rules/mw.json');
const nzRules = require('../permission-rules/nz.json');
const phRules = require('../permission-rules/ph.json');
const sgRules = require('../permission-rules/sg.json');
const uscrRules = require('../permission-rules/uscr.json');
const thRules = require('../permission-rules/th.json');
const zaRules = require('../permission-rules/za.json');
const zmRules = require('../permission-rules/zm.json');
Expand Down Expand Up @@ -260,6 +261,7 @@ const rulesMapDef = {
ph: phRules,
sg: sgRules,
th: thRules,
uscr: uscrRules,
za: zaRules,
zm: zmRules,
zw: zwRules,
Expand Down
2 changes: 1 addition & 1 deletion hrm-domain/hrm-service/setTestEnvVars.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ process.env.PERMISSIONS_ACnz = 'nz';
process.env.PERMISSIONS_ACph = 'ph';
process.env.PERMISSIONS_ACsg = 'sg';
process.env.PERMISSIONS_ACth = 'th';
process.env.PERMISSIONS_ACuk = 'uk';
process.env.PERMISSIONS_ACuscr = 'uscr';
process.env.PERMISSIONS_ACza = 'za';
process.env.PERMISSIONS_ACzm = 'zm';
process.env.PERMISSIONS_ACzw = 'zw';
Expand Down

0 comments on commit 4cca7d9

Please sign in to comment.