Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10416 bug - cold case report permissions for general user #5173

Merged
merged 3 commits into from
Jul 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 17 additions & 33 deletions shared/src/authorization/authorizationClientService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,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,
Expand All @@ -121,6 +120,7 @@ const adcPermissions = [
...allInternalUserPermissions,
ROLE_PERMISSIONS.CREATE_TRIAL_SESSION,
ROLE_PERMISSIONS.ORDER_RESPONSE,
ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES,
ROLE_PERMISSIONS.STAMP_MOTION,
];

Expand All @@ -141,6 +141,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,
];
Expand All @@ -155,6 +156,7 @@ const chambersPermissions = [
ROLE_PERMISSIONS.JUDGE_ACTIVITY_REPORT,
ROLE_PERMISSIONS.CASE_WORKSHEET,
ROLE_PERMISSIONS.DOCKET_ENTRY_WORKSHEET,
ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES,
ROLE_PERMISSIONS.ORDER_RESPONSE,
];

Expand All @@ -177,6 +179,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,
Expand All @@ -186,37 +189,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.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 = [
Expand All @@ -230,6 +205,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,
Expand Down Expand Up @@ -269,6 +245,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,
Expand Down Expand Up @@ -306,6 +283,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,
];

Expand All @@ -325,7 +303,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,
Expand All @@ -335,7 +316,10 @@ export const AUTHORIZATION_MAP = {
petitioner: petitionerPermissions,
petitionsclerk: petitionsClerkPermissions,
privatePractitioner: privatePractitionerPermissions,
reportersOffice: allInternalUserPermissions,
reportersOffice: [
...allInternalUserPermissions,
ROLE_PERMISSIONS.SEND_RECEIVE_MESSAGES,
],
trialclerk: trialClerkPermissions,
};

Expand Down
Loading