@ministryofjustice/hmpps-prison-permissions-lib 0.1.0 → 0.2.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 CHANGED
@@ -1,6 +1,13 @@
1
1
  # Change log
2
2
 
3
- Please use this to capture reasoning behind changes
3
+ Please use this to capture reasoning behind changes:
4
+
5
+ ## 0.2.0
6
+
7
+ Incident response. We are introducing an additional role enabling staff to upload photos via DPS.
8
+
9
+ This is in addition to the existing sensitive edit role to allow rollout of the feature independently of Prisoner
10
+ Profile edit.
4
11
 
5
12
  ## 0.1.0
6
13
 
package/README.md CHANGED
@@ -153,3 +153,4 @@ setupNunjucksPermissions(njkEnv)
153
153
 
154
154
  1. [Publishing to NPM](readme/publishing.md)
155
155
  2. [Contributing to permissions](readme/contributing.md)
156
+ 3. [Versioning guidance](readme/versioning.md)
package/dist/index.cjs CHANGED
@@ -86,6 +86,7 @@ exports.Role = void 0;
86
86
  Role["PathfinderStdProbation"] = "ROLE_PF_STD_PROBATION";
87
87
  Role["PathfinderUser"] = "ROLE_PF_USER";
88
88
  Role["PomUser"] = "ROLE_POM";
89
+ Role["PrisonerProfilePhotoUpload"] = "ROLE_PRISONER_PROFILE_PHOTO_UPLOAD";
89
90
  Role["PrisonerProfileSensitiveEdit"] = "ROLE_PRISONER_PROFILE_SENSITIVE_RW";
90
91
  Role["ReceptionUser"] = "ROLE_PRISON_RECEPTION";
91
92
  Role["ReleaseDatesCalculator"] = "ROLE_RELEASE_DATES_CALCULATOR";
@@ -685,7 +686,7 @@ function checkPhotoAccess(request) {
685
686
  function corePersonRecordCheck(request) {
686
687
  return {
687
688
  [exports.CorePersonRecordPermission.read_photo]: photoReadCheck(request),
688
- ...sensitiveEditCheck$2(exports.CorePersonRecordPermission.edit_photo, request),
689
+ [exports.CorePersonRecordPermission.edit_photo]: inActiveCaseLoadAndUserHasSomeRolesFrom([exports.Role.PrisonerProfileSensitiveEdit, exports.Role.PrisonerProfilePhotoUpload], exports.CorePersonRecordPermission.edit_photo, request),
689
690
  ...readCheck$4(exports.CorePersonRecordPermission.read_physical_characteristics, request),
690
691
  ...editCheck$4(exports.CorePersonRecordPermission.edit_physical_characteristics, request),
691
692
  ...readCheck$4(exports.CorePersonRecordPermission.read_place_of_birth, request),