From cb48f1fd162ae56b8dae0988b60cb80f315ae1a9 Mon Sep 17 00:00:00 2001 From: Allen Annom Date: Mon, 30 Sep 2024 17:27:46 +0100 Subject: [PATCH 1/3] UML-3619 wip --- docker-compose.yml | 4 ++-- .../app/src/App/src/Service/Lpa/LpaManagerFactory.php | 6 +++--- service-api/app/test/fixtures/example_lpa.json | 4 ++-- service-front/app/test/fixtures/full_example.json | 4 ++-- .../app/test/fixtures/full_example_signed_before_2016.json | 4 ++-- service-front/app/test/fixtures/simple_example.json | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 09e73026f3..8c3723e3bc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -108,7 +108,7 @@ services: ALLOW_MERIS_LPAS: "false" INSTRUCTIONS_AND_PREFERENCES: "true" ALLOW_GOV_ONE_LOGIN: "true" - SUPPORT_DATASTORE_LPAS: "false" + SUPPORT_DATASTORE_LPAS: "true" # Local only API_SERVICE_URL: @@ -195,7 +195,7 @@ services: ALLOW_MERIS_LPAS: "false" INSTRUCTIONS_AND_PREFERENCES: "true" ALLOW_GOV_ONE_LOGIN: "true" - SUPPORT_DATASTORE_LPAS: "false" + SUPPORT_DATASTORE_LPAS: "true" # Local only AWS_ACCESS_KEY_ID: "devkey" diff --git a/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php b/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php index f080ec8b44..7f98fd5a78 100644 --- a/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php +++ b/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php @@ -16,9 +16,9 @@ public function __construct(private readonly ContainerInterface $container) public function __invoke(): LpaManagerInterface { - if (($this->container->get(FeatureEnabled::class))('support_datastore_lpas')) { - throw new RuntimeException('Datastore LPA support is enabled but not implemented yet.'); - } +// if (($this->container->get(FeatureEnabled::class))('support_datastore_lpas')) { +// throw new RuntimeException('Datastore LPA support is enabled but not implemented yet.'); +// } return $this->container->get(SiriusLpaManager::class); } diff --git a/service-api/app/test/fixtures/example_lpa.json b/service-api/app/test/fixtures/example_lpa.json index 6b03b5feb6..c6b10036ed 100644 --- a/service-api/app/test/fixtures/example_lpa.json +++ b/service-api/app/test/fixtures/example_lpa.json @@ -14,9 +14,9 @@ "applicationHasRestrictions": true, "applicationHasGuidance": true, "lpaDonorSignatureDate": "2018-06-30", - "lifeSustainingTreatment": "yes", + "lifeSustainingTreatment": "Option A", "onlineLpaId": "ABC123", - "attorneyActDecisions": "Example decision", + "attorneyActDecisions": "jointly", "donor": { "id": 0, "uId": "700000000053", diff --git a/service-front/app/test/fixtures/full_example.json b/service-front/app/test/fixtures/full_example.json index 0ee7d679c3..1d72f1e121 100644 --- a/service-front/app/test/fixtures/full_example.json +++ b/service-front/app/test/fixtures/full_example.json @@ -16,9 +16,9 @@ "applicationHasRestrictions": true, "applicationHasGuidance": true, "lpaDonorSignatureDate": "2018-06-30", - "lifeSustainingTreatment": "yes", + "lifeSustainingTreatment": "Option A", "onlineLpaId": "ABC123", - "attorneyActDecisions": "Example decision", + "attorneyActDecisions": "jointly", "hasSeveranceWarning": true, "donor": { "id": 0, diff --git a/service-front/app/test/fixtures/full_example_signed_before_2016.json b/service-front/app/test/fixtures/full_example_signed_before_2016.json index c55c371de6..4b22813620 100644 --- a/service-front/app/test/fixtures/full_example_signed_before_2016.json +++ b/service-front/app/test/fixtures/full_example_signed_before_2016.json @@ -16,9 +16,9 @@ "applicationHasRestrictions": true, "applicationHasGuidance": true, "lpaDonorSignatureDate": "2015-06-30", - "lifeSustainingTreatment": "yes", + "lifeSustainingTreatment": "Option A", "onlineLpaId": "ABC123", - "attorneyActDecisions": "Example decision", + "attorneyActDecisions": "jointly", "donor": { "id": 0, "uId": "700000000054", diff --git a/service-front/app/test/fixtures/simple_example.json b/service-front/app/test/fixtures/simple_example.json index 0aaf437fb8..996a0bf278 100644 --- a/service-front/app/test/fixtures/simple_example.json +++ b/service-front/app/test/fixtures/simple_example.json @@ -18,7 +18,7 @@ "lpaDonorSignatureDate": "2018-06-30", "lifeSustainingTreatment": null, "onlineLpaId": "ABC123", - "attorneyActDecisions": "Example decision", + "attorneyActDecisions": "jointly", "donor": { "id": 0, "uId": "7000-0000-0054", From 7377fe59a2480aac25bcb0f3a2dcc8d8e78b7eec Mon Sep 17 00:00:00 2001 From: Allen Annom Date: Thu, 3 Oct 2024 09:34:35 +0100 Subject: [PATCH 2/3] UML-3619 Convert incoming LPAs to combined format (repository layer) --- docker-compose.yml | 4 ++-- .../app/src/App/src/Service/Lpa/LpaManagerFactory.php | 6 +++--- service-api/app/test/fixtures/example_lpa.json | 4 ++-- service-front/app/test/fixtures/full_example.json | 4 ++-- .../app/test/fixtures/full_example_signed_before_2016.json | 4 ++-- service-front/app/test/fixtures/simple_example.json | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8c3723e3bc..09e73026f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -108,7 +108,7 @@ services: ALLOW_MERIS_LPAS: "false" INSTRUCTIONS_AND_PREFERENCES: "true" ALLOW_GOV_ONE_LOGIN: "true" - SUPPORT_DATASTORE_LPAS: "true" + SUPPORT_DATASTORE_LPAS: "false" # Local only API_SERVICE_URL: @@ -195,7 +195,7 @@ services: ALLOW_MERIS_LPAS: "false" INSTRUCTIONS_AND_PREFERENCES: "true" ALLOW_GOV_ONE_LOGIN: "true" - SUPPORT_DATASTORE_LPAS: "true" + SUPPORT_DATASTORE_LPAS: "false" # Local only AWS_ACCESS_KEY_ID: "devkey" diff --git a/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php b/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php index 7f98fd5a78..f080ec8b44 100644 --- a/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php +++ b/service-api/app/src/App/src/Service/Lpa/LpaManagerFactory.php @@ -16,9 +16,9 @@ public function __construct(private readonly ContainerInterface $container) public function __invoke(): LpaManagerInterface { -// if (($this->container->get(FeatureEnabled::class))('support_datastore_lpas')) { -// throw new RuntimeException('Datastore LPA support is enabled but not implemented yet.'); -// } + if (($this->container->get(FeatureEnabled::class))('support_datastore_lpas')) { + throw new RuntimeException('Datastore LPA support is enabled but not implemented yet.'); + } return $this->container->get(SiriusLpaManager::class); } diff --git a/service-api/app/test/fixtures/example_lpa.json b/service-api/app/test/fixtures/example_lpa.json index c6b10036ed..6b03b5feb6 100644 --- a/service-api/app/test/fixtures/example_lpa.json +++ b/service-api/app/test/fixtures/example_lpa.json @@ -14,9 +14,9 @@ "applicationHasRestrictions": true, "applicationHasGuidance": true, "lpaDonorSignatureDate": "2018-06-30", - "lifeSustainingTreatment": "Option A", + "lifeSustainingTreatment": "yes", "onlineLpaId": "ABC123", - "attorneyActDecisions": "jointly", + "attorneyActDecisions": "Example decision", "donor": { "id": 0, "uId": "700000000053", diff --git a/service-front/app/test/fixtures/full_example.json b/service-front/app/test/fixtures/full_example.json index 1d72f1e121..0ee7d679c3 100644 --- a/service-front/app/test/fixtures/full_example.json +++ b/service-front/app/test/fixtures/full_example.json @@ -16,9 +16,9 @@ "applicationHasRestrictions": true, "applicationHasGuidance": true, "lpaDonorSignatureDate": "2018-06-30", - "lifeSustainingTreatment": "Option A", + "lifeSustainingTreatment": "yes", "onlineLpaId": "ABC123", - "attorneyActDecisions": "jointly", + "attorneyActDecisions": "Example decision", "hasSeveranceWarning": true, "donor": { "id": 0, diff --git a/service-front/app/test/fixtures/full_example_signed_before_2016.json b/service-front/app/test/fixtures/full_example_signed_before_2016.json index 4b22813620..c55c371de6 100644 --- a/service-front/app/test/fixtures/full_example_signed_before_2016.json +++ b/service-front/app/test/fixtures/full_example_signed_before_2016.json @@ -16,9 +16,9 @@ "applicationHasRestrictions": true, "applicationHasGuidance": true, "lpaDonorSignatureDate": "2015-06-30", - "lifeSustainingTreatment": "Option A", + "lifeSustainingTreatment": "yes", "onlineLpaId": "ABC123", - "attorneyActDecisions": "jointly", + "attorneyActDecisions": "Example decision", "donor": { "id": 0, "uId": "700000000054", diff --git a/service-front/app/test/fixtures/simple_example.json b/service-front/app/test/fixtures/simple_example.json index 996a0bf278..0aaf437fb8 100644 --- a/service-front/app/test/fixtures/simple_example.json +++ b/service-front/app/test/fixtures/simple_example.json @@ -18,7 +18,7 @@ "lpaDonorSignatureDate": "2018-06-30", "lifeSustainingTreatment": null, "onlineLpaId": "ABC123", - "attorneyActDecisions": "jointly", + "attorneyActDecisions": "Example decision", "donor": { "id": 0, "uId": "7000-0000-0054", From 13c6661cde904bc9abc278d44c70a73e35d75103 Mon Sep 17 00:00:00 2001 From: gillettmoj Date: Thu, 5 Dec 2024 15:54:42 +0000 Subject: [PATCH 3/3] Update lambda policy (#2983) * Remove default value * Update policy doc * Update policy doc * Update policy doc --- terraform/account/region/modules/lambda_function/iam.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/account/region/modules/lambda_function/iam.tf b/terraform/account/region/modules/lambda_function/iam.tf index 316f27e318..12ec547bca 100644 --- a/terraform/account/region/modules/lambda_function/iam.tf +++ b/terraform/account/region/modules/lambda_function/iam.tf @@ -60,7 +60,7 @@ data "aws_iam_policy_document" "lambda_iam_role" { data "aws_iam_policy_document" "combined_iam_role_policy" { source_policy_documents = [ data.aws_iam_policy_document.lambda_iam_role.json, - var.lambda_role_policy_document + var.lambda_role_policy_document != null ? var.lambda_role_policy_document : "" ] } resource "aws_iam_role_policy" "lambda" {