diff --git a/projects/hdc-licences-and-delius/README.md b/projects/hdc-licences-and-delius/README.md index 5855767848..1d4ad64ef7 100644 --- a/projects/hdc-licences-and-delius/README.md +++ b/projects/hdc-licences-and-delius/README.md @@ -1,3 +1,30 @@ -# hdc-licences-and-delius +# HDC Licences and Delius -// TODO Describe the service \ No newline at end of file +Supports integration between [HDC Licences](https://github.com/ministryofjustice/hmpps-hdc-api) and [Delius](https://github.com/ministryofjustice/delius). _HDC Licences_ is an HMPPS Digital service to manage applications for Home Detention Curfew, facilitating communication between the prison and probation staff managing the case. This involves assessing the details of the application (e.g. assess the proposed address for suitability) and submission for consideration in the custody release process. + +## Business Need + +Ensuring the user of the _HDC Licences_ has an up-to-date view of the probation case in _Delius_ when working on a licence application. + +## Context Map + +![Context Map](./tech-docs/source/img/hdc-licences-context-map.svg) + +## Workflows + +### Add HDC Role to Delius User + +A _Delius_ identity may be used to authenticate and authorise access to the _HDC Licences_ system. A _Delius_ role determines whether an authenticated _Delius_ user can access _HDC Licences_ and these HDC-specific roles can be added to the _Delius_ user via an API call. + +## Interfaces + +### API Access Control + +API endpoints are secured by roles supplied by the HMPPS Auth client used in the requests + +| API Endpoint | Required Role | +|-----------------------|-----------------------------------------| +| PUT /users/{username} | PROBATION\_API_\_HDC_\_USER\_ROLES_\_RW | +| GET /staff/* | PROBATION\_API_\_HDC_\_STAFF | +| GET /providers/* | PROBATION\_API_\_HDC_\_STAFF | +| GET /case/* | PROBATION\_API_\_HDC_\_STAFF | diff --git a/projects/hdc-licences-and-delius/tech-docs/diag/hdc-licences-context-map.d2 b/projects/hdc-licences-and-delius/tech-docs/diag/hdc-licences-context-map.d2 new file mode 100644 index 0000000000..82f47835e3 --- /dev/null +++ b/projects/hdc-licences-and-delius/tech-docs/diag/hdc-licences-context-map.d2 @@ -0,0 +1,36 @@ + +style { ...@../../../../script/style.style } +vars { ...@../../../../script/style.vars } +** { ...@../../../../script/style.all-style } + +context-delius: Delius Context { + + entities: Entities { + grid-columns: 3 + delius-user: Delius User + delius-role: Delius Role + provider: Provider + pdu: Probation Delivery Unit + lau: Local Admin Unit + staff: Staff + team: Team + pop: Person on Probation + com: Community Offender Manager + pom: Prison Offender Manager + } + + interface: HDC Licences and Delius { + type: Anti-Corruption\nLayer + } +} + +context-hdc-licences: HDC Licences Context { + entities: Entities { + grid-columns: 3 + user: HDC Licences User + pip: Person in Prison + probation-team: Probation Team + } +} + +context-delius.interface--context-hdc-licences: Upstream\n\n\nDownstream diff --git a/projects/hdc-licences-and-delius/tech-docs/source/img/hdc-licences-context-map.svg b/projects/hdc-licences-and-delius/tech-docs/source/img/hdc-licences-context-map.svg new file mode 100644 index 0000000000..91bdffc440 --- /dev/null +++ b/projects/hdc-licences-and-delius/tech-docs/source/img/hdc-licences-context-map.svg @@ -0,0 +1,128 @@ +Delius ContextHDC Licences ContextEntitiesHDC Licences and DeliusEntitiesDelius UserDelius RoleProviderProbation Delivery UnitLocal Admin UnitStaffTeamPerson on ProbationCommunity Offender ManagerPrison Offender ManagerAnti-CorruptionLayerHDC Licences UserPerson in PrisonProbation TeamUpstream Downstream + + + + + + + + + + + + + + + + + + + + + +