@ministryofjustice/hmpps-prison-permissions-lib 0.3.0 → 0.5.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
@@ -2,6 +2,14 @@
2
2
 
3
3
  Please use this to capture reasoning behind changes:
4
4
 
5
+ ## 0.5.0
6
+
7
+ No functionality changes. Dependencies updated and support for node 24 has been added.
8
+
9
+ ## 0.4.0
10
+
11
+ Access period for users with both the `POM` and `GLOBAL_SEARCH` roles to access prisoner case notes after a transfer extended from 30 to 90 days.
12
+
5
13
  ## 0.3.0
6
14
 
7
15
  Official release for updates to the Case Notes and Religion permissions.
package/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # hmpps-prison-permissions-lib
2
2
 
3
3
  [![repo standards badge](https://img.shields.io/badge/endpoint.svg?&style=flat&logo=github&url=https%3A%2F%2Foperations-engineering-reports.cloud-platform.service.justice.gov.uk%2Fapi%2Fv1%2Fcompliant_public_repositories%2Fhmpps-prison-permissions-lib)](https://operations-engineering-reports.cloud-platform.service.justice.gov.uk/public-report/hmpps-prison-permissions-lib "Link to report")
4
+ [![Test, lint & publish](https://github.com/ministryofjustice/hmpps-prison-permissions-lib/actions/workflows/pipeline.yml/badge.svg?branch=main)](https://github.com/ministryofjustice/hmpps-prison-permissions-lib/actions/workflows/pipeline.yml)
4
5
 
5
6
  A Node.js client library to centralise the process of determining user permissions for prison services and data.
6
7
 
@@ -143,7 +144,7 @@ setupNunjucksPermissions(njkEnv)
143
144
 
144
145
  * Using the permissions check in the template, for example:
145
146
 
146
- ```
147
+ ```nunjucks
147
148
  {% if isGranted(PrisonerMoneyPermission.read, res.locals.prisonerPermissions) %}
148
149
  ...
149
150
  {% endif %}
package/dist/index.cjs CHANGED
@@ -528,7 +528,7 @@ function isDateWithinBounds(dateToCheckInMs, upperDateBoundInMs, lowerDateBoundI
528
528
  return dateToCheckInMs <= upperDateBoundInMs && lowerDateBoundInMs <= dateToCheckInMs;
529
529
  }
530
530
 
531
- const caseNotesAccessPeriodPostTransferInMs = daysToMilliseconds(30);
531
+ const caseNotesAccessPeriodPostTransferInMs = daysToMilliseconds(90);
532
532
  function caseNotesReadAndEditCheck(permission, request) {
533
533
  const baseCheckPassed = request.baseCheckStatus === exports.PermissionCheckStatus.OK;
534
534
  const caseNotesCheckStatus = checkCaseNotesAccess(request);