From 4e8b6a3030a84d05dd49db405d7675b90542347f Mon Sep 17 00:00:00 2001 From: Andy Kuny Date: Mon, 22 Jul 2024 12:55:21 -0400 Subject: [PATCH 1/2] Add cold case report permission to general user --- shared/src/authorization/authorizationClientService.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/shared/src/authorization/authorizationClientService.ts b/shared/src/authorization/authorizationClientService.ts index c77376a1c4e..a1db76ce199 100644 --- a/shared/src/authorization/authorizationClientService.ts +++ b/shared/src/authorization/authorizationClientService.ts @@ -193,6 +193,7 @@ const generalUserPermissions = [ ROLE_PERMISSIONS.CASE_DEADLINE, ROLE_PERMISSIONS.CASE_INVENTORY_REPORT, ROLE_PERMISSIONS.CASE_NOTES, + ROLE_PERMISSIONS.COLD_CASE_REPORT, ROLE_PERMISSIONS.CONSOLIDATE_CASES, ROLE_PERMISSIONS.COURT_ISSUED_DOCUMENT, ROLE_PERMISSIONS.CREATE_TRIAL_SESSION, From c93626f5a650d2d199fcc6d6c736c8d60e5bca2a Mon Sep 17 00:00:00 2001 From: Andy Kuny Date: Mon, 22 Jul 2024 13:04:38 -0400 Subject: [PATCH 2/2] Refactor permissions so that general court user inherits all common permissions with other internal users --- .../authorizationClientService.ts | 51 +++++++------------ 1 file changed, 17 insertions(+), 34 deletions(-) diff --git a/shared/src/authorization/authorizationClientService.ts b/shared/src/authorization/authorizationClientService.ts index a1db76ce199..634b8b3a2d4 100644 --- a/shared/src/authorization/authorizationClientService.ts +++ b/shared/src/authorization/authorizationClientService.ts @@ -105,7 +105,6 @@ const allInternalUserPermissions = [ ROLE_PERMISSIONS.MANAGE_PRACTITIONER_USERS, ROLE_PERMISSIONS.PENDING_ITEMS, ROLE_PERMISSIONS.PRIORITIZE_CASE, - ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ROLE_PERMISSIONS.TRIAL_SESSIONS, ROLE_PERMISSIONS.UPDATE_CASE, ROLE_PERMISSIONS.UPLOAD_DOCUMENT, @@ -119,6 +118,7 @@ const allInternalUserPermissions = [ const adcPermissions = [ ...allInternalUserPermissions, ROLE_PERMISSIONS.CREATE_TRIAL_SESSION, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ROLE_PERMISSIONS.STAMP_MOTION, ]; @@ -139,6 +139,7 @@ const admissionsClerkPermissions = [ ROLE_PERMISSIONS.EDIT_PETITIONER_EMAIL, ROLE_PERMISSIONS.EDIT_PETITIONER_INFO, ROLE_PERMISSIONS.EMAIL_MANAGEMENT, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ROLE_PERMISSIONS.UPLOAD_PRACTITIONER_DOCUMENT, ROLE_PERMISSIONS.VIEW_SEALED_ADDRESS, ]; @@ -153,6 +154,7 @@ const chambersPermissions = [ ROLE_PERMISSIONS.JUDGE_ACTIVITY_REPORT, ROLE_PERMISSIONS.CASE_WORKSHEET, ROLE_PERMISSIONS.DOCKET_ENTRY_WORKSHEET, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ]; const docketClerkPermissions = [ @@ -174,6 +176,7 @@ const docketClerkPermissions = [ ROLE_PERMISSIONS.SEAL_ADDRESS, ROLE_PERMISSIONS.SEAL_CASE, ROLE_PERMISSIONS.SEAL_DOCKET_ENTRY, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ROLE_PERMISSIONS.SERVE_DOCUMENT, ROLE_PERMISSIONS.SET_FOR_HEARING, ROLE_PERMISSIONS.TRACKED_ITEMS, @@ -183,38 +186,9 @@ const docketClerkPermissions = [ ]; const generalUserPermissions = [ - ROLE_PERMISSIONS.ADD_CASE_TO_TRIAL_SESSION, - ROLE_PERMISSIONS.ADVANCED_SEARCH, - ROLE_PERMISSIONS.ARCHIVE_DOCUMENT, - ROLE_PERMISSIONS.ASSOCIATE_USER_WITH_CASE, - ROLE_PERMISSIONS.BATCH_DOWNLOAD_CASE_DOCUMENTS, - ROLE_PERMISSIONS.VIEW_PRACTITIONER_CASE_LIST, - ROLE_PERMISSIONS.BLOCK_CASE, - ROLE_PERMISSIONS.CASE_DEADLINE, - ROLE_PERMISSIONS.CASE_INVENTORY_REPORT, - ROLE_PERMISSIONS.CASE_NOTES, - ROLE_PERMISSIONS.COLD_CASE_REPORT, - ROLE_PERMISSIONS.CONSOLIDATE_CASES, - ROLE_PERMISSIONS.COURT_ISSUED_DOCUMENT, - ROLE_PERMISSIONS.CREATE_TRIAL_SESSION, - ROLE_PERMISSIONS.EDIT_ORDER, - ROLE_PERMISSIONS.GET_CASE, - ROLE_PERMISSIONS.GET_JUDGES, - ROLE_PERMISSIONS.GET_READ_MESSAGES, - ROLE_PERMISSIONS.GET_USER_PENDING_EMAIL, - ROLE_PERMISSIONS.GET_USER_PENDING_EMAIL_STATUS, - ROLE_PERMISSIONS.GET_USERS_IN_SECTION, - ROLE_PERMISSIONS.MANAGE_PRACTITIONER_USERS, - ROLE_PERMISSIONS.PENDING_ITEMS, - ROLE_PERMISSIONS.PRIORITIZE_CASE, - ROLE_PERMISSIONS.TRIAL_SESSIONS, - ROLE_PERMISSIONS.UPDATE_CASE, - ROLE_PERMISSIONS.UPLOAD_DOCUMENT, - ROLE_PERMISSIONS.VIEW_DOCUMENTS, - ROLE_PERMISSIONS.VIEW_MESSAGES, + ...allInternalUserPermissions, ROLE_PERMISSIONS.CASE_CORRESPONDENCE, - ROLE_PERMISSIONS.VIEW_SEALED_CASE, - ROLE_PERMISSIONS.WORKITEM, + ROLE_PERMISSIONS.CREATE_TRIAL_SESSION, ]; const petitionsClerkPermissions = [ @@ -228,6 +202,7 @@ const petitionsClerkPermissions = [ ROLE_PERMISSIONS.EDIT_CASE_DETAILS, ROLE_PERMISSIONS.EDIT_COUNSEL_ON_CASE, ROLE_PERMISSIONS.QC_PETITION, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ROLE_PERMISSIONS.SERVE_DOCUMENT, ROLE_PERMISSIONS.SERVE_PETITION, ROLE_PERMISSIONS.SET_TRIAL_SESSION_CALENDAR, @@ -267,6 +242,7 @@ const judgePermissions = [ ROLE_PERMISSIONS.JUDGES_NOTES, ROLE_PERMISSIONS.PENDING_MOTIONS_TABLE, ROLE_PERMISSIONS.TRIAL_SESSION_WORKING_COPY, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ROLE_PERMISSIONS.STAMP_MOTION, ROLE_PERMISSIONS.JUDGE_ACTIVITY_REPORT, ROLE_PERMISSIONS.CASE_WORKSHEET, @@ -303,6 +279,7 @@ const trialClerkPermissions = [ ...allInternalUserPermissions, ROLE_PERMISSIONS.BATCH_DOWNLOAD_TRIAL_SESSION, ROLE_PERMISSIONS.CREATE_TRIAL_SESSION, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, ROLE_PERMISSIONS.TRIAL_SESSION_WORKING_COPY, ]; @@ -322,7 +299,10 @@ export const AUTHORIZATION_MAP = { ROLE_PERMISSIONS.STAMP_MOTION, ], docketclerk: docketClerkPermissions, - floater: allInternalUserPermissions, + floater: [ + ...allInternalUserPermissions, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, + ], general: generalUserPermissions, inactivePractitioner: [], irsPractitioner: irsPractitionerPermissions, @@ -332,7 +312,10 @@ export const AUTHORIZATION_MAP = { petitioner: petitionerPermissions, petitionsclerk: petitionsClerkPermissions, privatePractitioner: privatePractitionerPermissions, - reportersOffice: allInternalUserPermissions, + reportersOffice: [ + ...allInternalUserPermissions, + ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES, + ], trialclerk: trialClerkPermissions, };