Skip to content

Commit f830873

Browse files
authored
Merge pull request #1423 from ministryofjustice/APS-237-api-add-new-role-for-appeals-manager
(APS-237) Add `appeals_manager` role to users
2 parents 801154e + f6b16f7 commit f830873

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

server/@types/shared/models/ApprovedPremisesUserRole.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
/* istanbul ignore file */
33
/* tslint:disable */
44
/* eslint-disable */
5-
export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'manager' | 'workflow_manager' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation';
5+
export type ApprovedPremisesUserRole = 'assessor' | 'matcher' | 'manager' | 'workflow_manager' | 'applicant' | 'role_admin' | 'report_viewer' | 'excluded_from_assess_allocation' | 'excluded_from_match_allocation' | 'excluded_from_placement_application_allocation' | 'appeals_manager';

server/utils/users/roleCheckboxes/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ export const roleLabelDictionary: RoleLabelDictionary = {
1313
label: 'Workflow manager',
1414
hint: 'Manage the allocation of assessments and matches to staff, and view reports',
1515
},
16+
appeals_manager: {
17+
label: 'Appeals manager',
18+
hint: 'Log appeals against rejected applications',
19+
},
1620
}
1721

1822
export const allocationRoleLabelDictionary: AllocationRoleLabelDictionary = {
@@ -41,6 +45,7 @@ export const roles: ReadonlyArray<UserRole> = [
4145
'excluded_from_assess_allocation',
4246
'excluded_from_match_allocation',
4347
'excluded_from_placement_application_allocation',
48+
'appeals_manager',
4449
]
4550

4651
export const allocationRoles = [

server/utils/users/userManagement.test.ts

+10
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ describe('userRolesSelectOptions', () => {
115115
text: 'Excluded from placement application allocation',
116116
value: 'excluded_from_placement_application_allocation',
117117
},
118+
{
119+
selected: false,
120+
text: 'Appeals manager',
121+
value: 'appeals_manager',
122+
},
118123
])
119124
})
120125

@@ -135,6 +140,11 @@ describe('userRolesSelectOptions', () => {
135140
text: 'Excluded from placement application allocation',
136141
value: 'excluded_from_placement_application_allocation',
137142
},
143+
{
144+
selected: false,
145+
text: 'Appeals manager',
146+
value: 'appeals_manager',
147+
},
138148
])
139149
})
140150
})

server/utils/users/userManagement.ts

+1
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const userRoles: Record<ApprovedPremisesUserRole, string> = {
5656
excluded_from_assess_allocation: 'Excluded from assess allocation',
5757
excluded_from_match_allocation: 'Excluded from match allocation',
5858
excluded_from_placement_application_allocation: 'Excluded from placement application allocation',
59+
appeals_manager: 'Appeals manager',
5960
}
6061
export const userRolesSelectOptions = (
6162
selectedOption: ApprovedPremisesUserRole | undefined | null,

0 commit comments

Comments
 (0)