From 7e2cfc48420bb91975ced47dda06505d636cbfbe Mon Sep 17 00:00:00 2001 From: Matthew Jadud Date: Wed, 31 Jul 2024 08:57:15 -0400 Subject: [PATCH 1/3] Removing an offensive logging statement in workbook generation (locally) (#4080) * Removing an offensive logging statement * Add a newline, appease the linting gods --------- Co-authored-by: James Person --- backend/schemas/scripts/render.py | 1 - 1 file changed, 1 deletion(-) diff --git a/backend/schemas/scripts/render.py b/backend/schemas/scripts/render.py index c7fdf88661..1f4f7aca6e 100644 --- a/backend/schemas/scripts/render.py +++ b/backend/schemas/scripts/render.py @@ -557,7 +557,6 @@ def set_wb_security(wb, password): # I cannot prevent the sheets from unlocking. wb.security = WorkbookProtection(workbookPassword=password, lockStructure=True) wb.security.lockStructure = True - print(f"To unlock: {password}") def save_workbook(wb, basename): From 841f6e086ae7ac2c5dee077c2e32854bf39ab01d Mon Sep 17 00:00:00 2001 From: James Person Date: Wed, 31 Jul 2024 10:25:11 -0400 Subject: [PATCH 2/3] Add a Log When Creating a UEI Validation Waiver (#4123) * Log UEI validation waivers on addition by admin * Fix a typo in a comment --- backend/api/test_serializers.py | 2 +- backend/audit/admin.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/backend/api/test_serializers.py b/backend/api/test_serializers.py index 489ef933f0..c94de7972f 100644 --- a/backend/api/test_serializers.py +++ b/backend/api/test_serializers.py @@ -125,7 +125,7 @@ def test_expired_waived_uei_payload(self): expiration=expired["expiration"], ) - # Invalid due to the waiver being expired. Mock the SAM call as though the entity doesnt exist. + # Invalid due to the waiver being expired. Mock the SAM call as though the entity does not exist. with patch("api.uei.SESSION.get") as mock_get: mock_get.return_value.status_code = 200 mock_get.return_value.json.return_value = json.loads(missing_uei_results) diff --git a/backend/audit/admin.py b/backend/audit/admin.py index 50494c1521..9f7bd16e74 100644 --- a/backend/audit/admin.py +++ b/backend/audit/admin.py @@ -262,6 +262,12 @@ class UeiValidationWaiverAdmin(admin.ModelAdmin): ) readonly_fields = ("timestamp",) + def save_model(self, request, obj, form, change): + super().save_model(request, obj, form, change) + logger.info( + f'Validation Waiver for UEI "{obj.uei}" successfully added by user: {request.user.email}.' + ) + admin.site.register(Access, AccessAdmin) admin.site.register(DeletedAccess, DeletedAccessAdmin) From 1bed1651be227e72ed31a0fac211625178ba651f Mon Sep 17 00:00:00 2001 From: Alex Steel <130377221+asteel-gsa@users.noreply.github.com> Date: Wed, 31 Jul 2024 13:42:30 -0400 Subject: [PATCH 3/3] fix typo (#4136) --- terraform/shared/modules/cors/production-cors.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/terraform/shared/modules/cors/production-cors.json b/terraform/shared/modules/cors/production-cors.json index d8ce983bde..fe4897bb1c 100644 --- a/terraform/shared/modules/cors/production-cors.json +++ b/terraform/shared/modules/cors/production-cors.json @@ -9,7 +9,7 @@ "GET" ], "AllowedOrigins": [ - "https://app.cloud.gov" + "https://app.fac.gov" ], "ExposeHeaders": [ "ETag"