@ministryofjustice/hmpps-prison-permissions-lib 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +6 -6
- package/dist/index.esm.js.map +1 -1
- package/package.json +16 -16
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
|
|
3
3
|
Please use this to capture reasoning behind changes:
|
|
4
4
|
|
|
5
|
+
## 2.6.0
|
|
6
|
+
|
|
7
|
+
The following permissions now use the `inUsersCaseLoad` check rather than `baseCheck` only.
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
CorePersonRecordPermission.read_place_of_birth
|
|
11
|
+
CorePersonRecordPermission.read_nationality
|
|
12
|
+
PersonProtectedCharacteristicsPermission.read_sexual_orientation
|
|
13
|
+
PersonHealthAndMedicationPermission.read_smoker
|
|
14
|
+
PersonalRelationshipsPermission.read_number_of_children
|
|
15
|
+
PersonalRelationshipsPermission.read_domestic_status
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
In line with these updates, the prisoner profile contract has changed.
|
|
19
|
+
|
|
20
|
+
## 2.5.1
|
|
21
|
+
|
|
22
|
+
Updated dependencies
|
|
23
|
+
|
|
5
24
|
## 2.5.0
|
|
6
25
|
|
|
7
26
|
Restricted diet and allergy read access for global search and updated dependencies.
|
package/dist/index.cjs
CHANGED
|
@@ -1033,7 +1033,7 @@ function corePersonRecordCheck(context) {
|
|
|
1033
1033
|
...check(exports.CorePersonRecordPermission.edit_photo, inActiveCaseLoadAndUserHasSomeRolesFrom([exports.Role.PrisonerProfileSensitiveEdit, exports.Role.PrisonerProfilePhotoUpload])),
|
|
1034
1034
|
...check(exports.CorePersonRecordPermission.read_physical_characteristics, baseCheck),
|
|
1035
1035
|
...check(exports.CorePersonRecordPermission.edit_physical_characteristics, prisonerProfileEditCheck),
|
|
1036
|
-
...check(exports.CorePersonRecordPermission.read_place_of_birth,
|
|
1036
|
+
...check(exports.CorePersonRecordPermission.read_place_of_birth, inUsersCaseLoad),
|
|
1037
1037
|
...check(exports.CorePersonRecordPermission.edit_place_of_birth, prisonerProfileSensitiveEditCheck),
|
|
1038
1038
|
...check(exports.CorePersonRecordPermission.read_military_history, baseCheck),
|
|
1039
1039
|
...check(exports.CorePersonRecordPermission.edit_military_history, prisonerProfileEditCheck),
|
|
@@ -1043,7 +1043,7 @@ function corePersonRecordCheck(context) {
|
|
|
1043
1043
|
...check(exports.CorePersonRecordPermission.edit_date_of_birth, prisonerProfileSensitiveEditCheck),
|
|
1044
1044
|
...check(exports.CorePersonRecordPermission.read_address, baseCheck),
|
|
1045
1045
|
...check(exports.CorePersonRecordPermission.edit_address, prisonerProfileSensitiveEditCheck),
|
|
1046
|
-
...check(exports.CorePersonRecordPermission.read_nationality,
|
|
1046
|
+
...check(exports.CorePersonRecordPermission.read_nationality, inUsersCaseLoad),
|
|
1047
1047
|
...check(exports.CorePersonRecordPermission.edit_nationality, prisonerProfileSensitiveEditCheck),
|
|
1048
1048
|
...check(exports.CorePersonRecordPermission.read_identifiers, baseCheck),
|
|
1049
1049
|
...check(exports.CorePersonRecordPermission.edit_identifiers, prisonerProfileSensitiveEditCheck),
|
|
@@ -1059,7 +1059,7 @@ function corePersonRecordCheck(context) {
|
|
|
1059
1059
|
function personProtectedCharacteristicsCheck(context) {
|
|
1060
1060
|
const check = checkWith(context);
|
|
1061
1061
|
return {
|
|
1062
|
-
...check(exports.PersonProtectedCharacteristicsPermission.read_sexual_orientation,
|
|
1062
|
+
...check(exports.PersonProtectedCharacteristicsPermission.read_sexual_orientation, inUsersCaseLoad),
|
|
1063
1063
|
...check(exports.PersonProtectedCharacteristicsPermission.edit_sexual_orientation, prisonerProfileSensitiveEditCheck),
|
|
1064
1064
|
...check(exports.PersonProtectedCharacteristicsPermission.read_religion_and_belief, inUsersCaseLoad),
|
|
1065
1065
|
...check(exports.PersonProtectedCharacteristicsPermission.edit_religion_and_belief, prisonerProfileEditCheck),
|
|
@@ -1084,7 +1084,7 @@ function personHealthAndMedicationCheck(context) {
|
|
|
1084
1084
|
return {
|
|
1085
1085
|
...check(exports.PersonHealthAndMedicationPermission.read_pregnancy, baseCheck),
|
|
1086
1086
|
...check(exports.PersonHealthAndMedicationPermission.edit_pregnancy, prisonerProfileEditCheck),
|
|
1087
|
-
...check(exports.PersonHealthAndMedicationPermission.read_smoker,
|
|
1087
|
+
...check(exports.PersonHealthAndMedicationPermission.read_smoker, inUsersCaseLoad),
|
|
1088
1088
|
...check(exports.PersonHealthAndMedicationPermission.edit_smoker, prisonerProfileEditCheck),
|
|
1089
1089
|
...check(exports.PersonHealthAndMedicationPermission.read_diet, dietReadCheck),
|
|
1090
1090
|
...check(exports.PersonHealthAndMedicationPermission.edit_diet, dietEditCheck),
|
|
@@ -1121,9 +1121,9 @@ const contactsReadCheck = matchBaseCheckAnd({
|
|
|
1121
1121
|
function personalRelationshipsCheck(context) {
|
|
1122
1122
|
const check = checkWith(context);
|
|
1123
1123
|
return {
|
|
1124
|
-
...check(exports.PersonalRelationshipsPermission.read_number_of_children,
|
|
1124
|
+
...check(exports.PersonalRelationshipsPermission.read_number_of_children, inUsersCaseLoad),
|
|
1125
1125
|
...check(exports.PersonalRelationshipsPermission.edit_number_of_children, prisonerProfileEditCheck),
|
|
1126
|
-
...check(exports.PersonalRelationshipsPermission.read_domestic_status,
|
|
1126
|
+
...check(exports.PersonalRelationshipsPermission.read_domestic_status, inUsersCaseLoad),
|
|
1127
1127
|
...check(exports.PersonalRelationshipsPermission.edit_domestic_status, prisonerProfileEditCheck),
|
|
1128
1128
|
...check(exports.PersonalRelationshipsPermission.read_emergency_contacts, baseCheck),
|
|
1129
1129
|
...check(exports.PersonalRelationshipsPermission.edit_emergency_contacts, prisonerProfileSensitiveEditCheck),
|