From 68990cdf2e7fee5362eb2a6b55258253feb5e29c Mon Sep 17 00:00:00 2001 From: Michael Olund Date: Thu, 15 Oct 2020 14:51:28 -0700 Subject: [PATCH 01/22] DIV-1198 - Blank pages in PDFs --- .../apps/core/templates/pdf/images_to_pdf.html | 2 +- edivorce/apps/core/templatetags/format_utils.py | 16 ---------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/edivorce/apps/core/templates/pdf/images_to_pdf.html b/edivorce/apps/core/templates/pdf/images_to_pdf.html index 8a6da5e5..e6539c7b 100644 --- a/edivorce/apps/core/templates/pdf/images_to_pdf.html +++ b/edivorce/apps/core/templates/pdf/images_to_pdf.html @@ -29,7 +29,7 @@

Filing Options

-{% if where_were_you_married_country == 'Canada' and not request.user.is_bcsc %} +{% if where_were_you_married_country == 'Canada' %}

You can file (?) your application for divorce in different ways.

{% endif %}

To file (?) your documents, you will need:

@@ -72,7 +72,7 @@
  • You will need to have your affidavit(s) sworn/affirmed (see above)
  • Photo ID
  • -{% if where_were_you_married_country == 'Canada' and not request.user.is_bcsc %} +{% if where_were_you_married_country == 'Canada' %}

    Select how you would like to file (?) your documents:

    diff --git a/edivorce/apps/core/templates/question/01_orders.html b/edivorce/apps/core/templates/question/01_orders.html index 7a16522a..1351d088 100644 --- a/edivorce/apps/core/templates/question/01_orders.html +++ b/edivorce/apps/core/templates/question/01_orders.html @@ -81,7 +81,7 @@ asked to provide details for each request.

    For more information, please refer to the - Spousal Support fact sheet on the Family Law in B.C. website.

    @@ -136,7 +136,7 @@ asked to provide details for each request.

    Anything you own including real estate, bank accounts, cars and RRSPs. For more information, please refer to the - Dealing with Debts After Separation fact sheet on the Family Law in B.C. website.

    @@ -271,14 +271,14 @@ asked to provide details for each request.

    More information on which court you may need to go to can be found on the - Family Law in B.C. website + Family Law in B.C. website and the Government of B.C. website.

    Asking for Orders Pertaining to Children in Provincial or Supreme Court.

    If you will be asking for parenting and support issues, you can choose between the - Divorce Act + Divorce Act or the Family Law Act. @@ -452,7 +452,7 @@ asked to provide details for each request.

    More information on - Court Orders can be found on the Family Law in B.C. website.

    diff --git a/edivorce/apps/core/templates/question/06_children_income_expenses.html b/edivorce/apps/core/templates/question/06_children_income_expenses.html index 76378128..bdd80b4e 100644 --- a/edivorce/apps/core/templates/question/06_children_income_expenses.html +++ b/edivorce/apps/core/templates/question/06_children_income_expenses.html @@ -581,7 +581,7 @@

    For more information on - undue hardship + undue hardship refer to the Family Law of B.C. website.

    @@ -606,7 +606,7 @@

    More details on what are - + generally considered special or extraordinary expenses can be found on the Family Law of B.C. website. diff --git a/edivorce/apps/core/templates/question/06_children_what_for.html b/edivorce/apps/core/templates/question/06_children_what_for.html index c97ff8c8..88d9e1ed 100644 --- a/edivorce/apps/core/templates/question/06_children_what_for.html +++ b/edivorce/apps/core/templates/question/06_children_what_for.html @@ -151,7 +151,7 @@

    If you wish to file your separation agreement the parts of the agreement that deal with parenting and support can be enforced as if they were in a court order. More information on - + how to file your agreement can be found on the Family Law website. @@ -191,7 +191,7 @@

    If you - + wish to file your separation agreement , the parts of the agreement that deal with parenting and support can be @@ -260,7 +260,7 @@

    If you wish to file your separation agreement, the parts of the agreement that deal with parenting and support can be enforced as if they were in a court order. More information on - + how to file your agreement can be found on the Family Law website. @@ -391,7 +391,7 @@ The Supreme Court Family Order Pick List which sets out standard terms for most of the usual orders made in family cases. Refer to the fact sheet - + Child Support by the Legal Services Society for more information.

    @@ -457,7 +457,7 @@

    There are big differences in how the Divorce Act and the Family Law Act deal with some issues, especially parenting. For more information, see the fact sheet - + Parenting apart and the other fact sheets it links to.

    @@ -499,7 +499,7 @@ you must only consider the child’s best interests. And if you go to court, the judge can only consider the child’s best interests in making parenting orders. For more information on the - + best interests of the child please refer to the Family Law in B.C. website. diff --git a/edivorce/apps/core/templates/question/06_children_your_children.html b/edivorce/apps/core/templates/question/06_children_your_children.html index 307ef941..2491984e 100644 --- a/edivorce/apps/core/templates/question/06_children_your_children.html +++ b/edivorce/apps/core/templates/question/06_children_your_children.html @@ -231,7 +231,7 @@

    For more information on - step-parents' rights and responsibilities please refer to the Family Law of B.C. website.

    diff --git a/edivorce/apps/core/templates/question/07_support.html b/edivorce/apps/core/templates/question/07_support.html index ec44c73d..28a9fc03 100644 --- a/edivorce/apps/core/templates/question/07_support.html +++ b/edivorce/apps/core/templates/question/07_support.html @@ -63,7 +63,7 @@ or a family justice counsellor for help. For more information, please see the fact sheet - Spousal Support on the Family Law in B.C. website.

    @@ -83,7 +83,7 @@ detailed in a separation agreement.

    Many couples come to an agreement about spousal support outside of court and capture the details in a - separation agreement. "Agreements that are filed with the court can be enforced — they have the same force as a court order. They can also be set aside (cancelled) if the situation @@ -107,7 +107,7 @@

    For help on what factors to consider, and details to include in your spousal support agreement, refer to the online tool, - How to Write Your Own Separation Agreement, on the Family Law in B.C. website.

    @@ -206,7 +206,7 @@

    There are big differences in how the Divorce Act and the Family Law Act deal with some issues, especially parenting. For more information on - which laws apply to your situation please refer to the Family Law of B.C. website.

    @@ -284,7 +284,7 @@ into account the income of both spouses, how long you were married, and whether you have children.

    For more information, see the Department of Justice website on - spousal support.

    @@ -321,7 +321,7 @@ target="_blank">Financial Statement Form (F8) and file it with the court for orders related to support. For help, refer to the guide - How to deal with a Supreme Court Financial Statement, produced by the Legal Services Society.

    diff --git a/edivorce/apps/core/templates/question/08_property.html b/edivorce/apps/core/templates/question/08_property.html index c057142a..38d09daa 100644 --- a/edivorce/apps/core/templates/question/08_property.html +++ b/edivorce/apps/core/templates/question/08_property.html @@ -132,8 +132,8 @@

    The Family Law web site has an online separation agreement tool that details some of the items to consider when - dividing property and - debt.

    + dividing property and + debt.

    {% input_field type="textarea" name="how_to_divide_property_debt" rows="8" cols="65" class="response-textarea" %} @@ -223,11 +223,11 @@ target="_blank">Family Justice section of the BC Government web site.
  • Dividing family property and debts on the Family Law in British Columbia website
  • Living Together or Living Apart, a booklet about the family law basics in B.C.
  • Date: Mon, 19 Oct 2020 18:46:17 -0700 Subject: [PATCH 21/22] Updated the eFiling poc to work with Keycloak --- edivorce/apps/core/efilinghub.py | 9 +++------ edivorce/apps/core/middleware/keycloak.py | 6 +++++- edivorce/apps/core/tests/test_efiling_hub.py | 14 ++++---------- 3 files changed, 12 insertions(+), 17 deletions(-) diff --git a/edivorce/apps/core/efilinghub.py b/edivorce/apps/core/efilinghub.py index 87f00198..69ce7318 100644 --- a/edivorce/apps/core/efilinghub.py +++ b/edivorce/apps/core/efilinghub.py @@ -159,12 +159,9 @@ class EFilingHub: # unavailable for a local eDivorce environment. Use an env specified mapping # to figure out what we should pass through to eFiling Hub. This BCEID username # needs to match with what you will be logging in with to the Test BCEID environment. - username = request.session.get('login_name', None) - if username: - if username in settings.EFILING_BCEID: - return settings.EFILING_BCEID[username] - return request.session.get('fake_bceid_guid', None) - return request.session.get('smgov_userguid', None) + # return 'ade9f711-d8c5-402e-8f70-5f0a1d4cc181' + return '53993f22-be67-43b9-94f2-222eca1b3bf7' + return request.session.get('bcgov_userguid', None) guid = _get_raw_bceid(request) if guid: diff --git a/edivorce/apps/core/middleware/keycloak.py b/edivorce/apps/core/middleware/keycloak.py index c7eb1dfa..b25187ef 100644 --- a/edivorce/apps/core/middleware/keycloak.py +++ b/edivorce/apps/core/middleware/keycloak.py @@ -23,6 +23,8 @@ class EDivorceKeycloakBackend(OIDCAuthenticationBackend): user.user_guid = claims.get('universal-id', '') user.save() + self.request.session['bcgov_userguid'] = user.user_guid + return user def update_user(self, user, claims): @@ -33,6 +35,8 @@ class EDivorceKeycloakBackend(OIDCAuthenticationBackend): user.user_guid = claims.get('universal-id', '') user.save() + self.request.session['bcgov_userguid'] = user.user_guid + return user def filter_users_by_claims(self, claims): @@ -43,6 +47,6 @@ class EDivorceKeycloakBackend(OIDCAuthenticationBackend): def keycloak_logout(request): - redirect_uri = absolutify(request, settings.PROXY_URL_PREFIX + '/') + redirect_uri = absolutify(request, settings.FORCE_SCRIPT_NAME) return f'{settings.KEYCLOAK_LOGOUT}?redirect_uri={redirect_uri}' diff --git a/edivorce/apps/core/tests/test_efiling_hub.py b/edivorce/apps/core/tests/test_efiling_hub.py index d3c4f074..b289fe91 100644 --- a/edivorce/apps/core/tests/test_efiling_hub.py +++ b/edivorce/apps/core/tests/test_efiling_hub.py @@ -152,17 +152,11 @@ class EFilingHubTests(TransactionTestCase): self.assertTrue('transaction_id' in self.request.session) def test_bceid_get_current(self): - self.request.session['smgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' + self.request.session['bcgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' with self.settings(DEPLOYMENT_TYPE='prod'): bceid = self.hub._get_bceid(self.request) self.assertEqual(bceid, '70fc9ce1-0cd6-4170-b842-bbabb88452a9') - def test_bceid_get_local_fake(self): - self.request.session['fake_bceid_guid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' - with self.settings(DEPLOYMENT_TYPE='localdev'): - bceid = self.hub._get_bceid(self.request) - self.assertEqual(bceid, '70fc9ce1-0cd6-4170-b842-bbabb88452a9') - def test_bceid_anonymous_user(self): with self.settings(DEPLOYMENT_TYPE='prod'): bceid = self.hub._get_bceid(self.request) @@ -194,7 +188,7 @@ class EFilingHubTests(TransactionTestCase): @mock.patch('edivorce.apps.core.efilinghub.EFilingHub._get_api') def test_upload_success(self, mock_get_api): - self.request.session['smgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' + self.request.session['bcgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' with self.settings(DEPLOYMENT_TYPE='prod'): mock_get_api.side_effect = [ self._mock_response(text=json.dumps(INITIAL_DOC_UPLOAD_RESPONSE)), @@ -208,7 +202,7 @@ class EFilingHubTests(TransactionTestCase): @mock.patch('edivorce.apps.core.efilinghub.EFilingHub._get_api') def test_upload_failed_initial_upload(self, mock_get_api): - self.request.session['smgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' + self.request.session['bcgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' with self.settings(DEPLOYMENT_TYPE='prod'): mock_get_api.side_effect = [ self._mock_response(text=json.dumps(INITIAL_DOC_UPLOAD_RESPONSE), status=401), @@ -220,7 +214,7 @@ class EFilingHubTests(TransactionTestCase): @mock.patch('edivorce.apps.core.efilinghub.EFilingHub._get_api') def test_upload_failed_generate_url(self, mock_get_api): - self.request.session['smgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' + self.request.session['bcgov_userguid'] = '70fc9ce1-0cd6-4170-b842-bbabb88452a9' with self.settings(DEPLOYMENT_TYPE='prod'): mock_get_api.side_effect = [ self._mock_response(text=json.dumps(INITIAL_DOC_UPLOAD_RESPONSE)), From aed4fddfbe2154ec5284ab95b5e961f0698befbe Mon Sep 17 00:00:00 2001 From: Michael Olund Date: Tue, 20 Oct 2020 09:10:06 -0700 Subject: [PATCH 22/22] Removed outdated Visual Studio solution files --- eDivorce.pyproj | 270 ------------------------------------------------ eDivorce.sln | 25 ----- 2 files changed, 295 deletions(-) delete mode 100644 eDivorce.pyproj delete mode 100644 eDivorce.sln diff --git a/eDivorce.pyproj b/eDivorce.pyproj deleted file mode 100644 index 8fbc8dd7..00000000 --- a/eDivorce.pyproj +++ /dev/null @@ -1,270 +0,0 @@ - - - - Debug - 2.0 - {49af6729-7075-48ab-903a-dd921e4282b5} - - manage.py - - . - . - {5F0BE9CA-D677-4A4D-8806-6076C0FAAD37};{349c5851-65df-11da-9384-00065b846f21};{888888a0-9f3d-457c-b088-3a5042f75d52} - Django launcher - MSBuild|env|$(MSBuildProjectFullPath) - http://localhost - edivorce.settings.local - - - - - 10.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - env - 3.6 - env (Python 3.6 (64-bit)) - Scripts\python.exe - Scripts\pythonw.exe - PYTHONPATH - X64 - - - - - - - - True - True - http://localhost - False - - - - - - - CurrentPage - True - False - False - False - - - - - - - - - False - False - - - - - \ No newline at end of file diff --git a/eDivorce.sln b/eDivorce.sln deleted file mode 100644 index 8d418f8e..00000000 --- a/eDivorce.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.27703.2018 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "eDivorce", "eDivorce.pyproj", "{49AF6729-7075-48AB-903A-DD921E4282B5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {49AF6729-7075-48AB-903A-DD921E4282B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {49AF6729-7075-48AB-903A-DD921E4282B5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {49AF6729-7075-48AB-903A-DD921E4282B5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {49AF6729-7075-48AB-903A-DD921E4282B5}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {9E16EECB-E9F8-4631-BA0D-4BC734F9D5FA} - EndGlobalSection -EndGlobal