From a95ff2bf53fc5e3c088a9556ec1e958ff76d1ca8 Mon Sep 17 00:00:00 2001 From: rachidatecs Date: Fri, 19 May 2023 10:48:34 -0400 Subject: [PATCH 1/4] add test --- src/registrar/tests/test_views.py | 6 ++++++ src/registrar/views/domain.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/registrar/tests/test_views.py b/src/registrar/tests/test_views.py index ee83034e1..959183f34 100644 --- a/src/registrar/tests/test_views.py +++ b/src/registrar/tests/test_views.py @@ -1095,6 +1095,12 @@ class TestDomainPermissions(TestWithDomainPermissions): ) self.assertEqual(response.status_code, 403) + with less_console_noise(): + response = self.client.get( + reverse("domain-security-email", kwargs={"pk": self.domain.id}) + ) + self.assertEqual(response.status_code, 403) + class TestDomainDetail(TestWithDomainPermissions, WebTest): def setUp(self): diff --git a/src/registrar/views/domain.py b/src/registrar/views/domain.py index d0fa8952e..b5962c398 100644 --- a/src/registrar/views/domain.py +++ b/src/registrar/views/domain.py @@ -130,7 +130,7 @@ class DomainSecurityEmailView(DomainPermission, FormMixin, DetailView): """The form is valid, call setter in model.""" # Set the security email from the form - new_email = form.cleaned_data["security_email"] + new_email = form.cleaned_data.get("security_email", "") domain = self.get_object() domain.set_security_email(new_email) From a85bd5231f9b0719602858ae15d471da13f9f5f1 Mon Sep 17 00:00:00 2001 From: rachidatecs Date: Fri, 19 May 2023 10:59:55 -0400 Subject: [PATCH 2/4] change the url from securityemail to security-email --- src/registrar/config/urls.py | 2 +- src/zap.conf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/registrar/config/urls.py b/src/registrar/config/urls.py index bd5b22da7..e903b4e8f 100644 --- a/src/registrar/config/urls.py +++ b/src/registrar/config/urls.py @@ -84,7 +84,7 @@ urlpatterns = [ name="domain-nameservers", ), path( - "domain//securityemail", + "domain//security-email", views.DomainSecurityEmailView.as_view(), name="domain-security-email", ), diff --git a/src/zap.conf b/src/zap.conf index bb86d60b7..ee92e8a1c 100644 --- a/src/zap.conf +++ b/src/zap.conf @@ -52,7 +52,7 @@ 10038 OUTOFSCOPE http://app:8080/users 10038 OUTOFSCOPE http://app:8080/users/add 10038 OUTOFSCOPE http://app:8080/nameservers -10038 OUTOFSCOPE http://app:8080/securityemail +10038 OUTOFSCOPE http://app:8080/security-email 10038 OUTOFSCOPE http://app:8080/delete 10038 OUTOFSCOPE http://app:8080/withdraw 10038 OUTOFSCOPE http://app:8080/withdrawconfirmed From ace9a8e6a790849ba5ba944a0591f1023fd039c0 Mon Sep 17 00:00:00 2001 From: Michelle Rago <60157596+michelle-rago@users.noreply.github.com> Date: Mon, 22 May 2023 12:01:34 -0400 Subject: [PATCH 3/4] Update banner text (#635) * Update banner text * Update base.html * Added
code back --- src/registrar/templates/base.html | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/registrar/templates/base.html b/src/registrar/templates/base.html index f90ac2014..3ca280a0b 100644 --- a/src/registrar/templates/base.html +++ b/src/registrar/templates/base.html @@ -61,18 +61,15 @@ Skip to main content {% if IS_DEMO_SITE %} -
-
-
-

- TEST SITE - Do not use real personal information. Demo purposes only. -

-
+
+
+
+

+ BETA SITE: We’re building a new way to get a .gov. Take a look around, but don’t rely on this site yet. This site is for testing purposes only. Don’t enter real data into any form on this site. To learn about requesting a .gov domain, visit get.gov +

-
+
+
{% endif %}
From 6e81f2db85ab691648da3cf3f407032629d412c1 Mon Sep 17 00:00:00 2001 From: Alysia Broddrick Date: Mon, 22 May 2023 14:19:19 -0700 Subject: [PATCH 4/4] updated sr-only tag to match the section its in --- src/registrar/templates/home.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registrar/templates/home.html b/src/registrar/templates/home.html index a92d2973c..aa2034a27 100644 --- a/src/registrar/templates/home.html +++ b/src/registrar/templates/home.html @@ -22,7 +22,7 @@

Registered domains

{% if domains %} - +
Your domain applicationsYour registered domains
Domain name