Merge branch 'main' into nmb/543-login-required-middleware

This commit is contained in:
Neil Martinsen-Burrell 2023-06-09 08:28:25 -05:00
commit 6143fd52ad
No known key found for this signature in database
GPG key ID: 6A3C818CC10D0184
10 changed files with 166 additions and 95 deletions

View file

@ -1,6 +1,5 @@
name: Bug name: Bug
description: Report a bug description: Report a bug or problem with the application
title: "[Bug]: "
labels: ["bug"] labels: ["bug"]
body: body:
@ -56,4 +55,14 @@ body:
id: additional-context id: additional-context
attributes: attributes:
label: Additional Context (optional) label: Additional Context (optional)
description: "Please include additional references, screenshots, documentation, etc. that are relevant" description: "Please include additional references (screenshots, design links, documentation, etc.) that are relevant"
- type: textarea
id: issue-links
attributes:
label: Issue Links (optional)
description: |
What other issues does this story relate to and how?
Example:
- 🚧 Blocked by: #123
- 🔄 Relates to: #234

View file

@ -1,6 +1,5 @@
name: User Story name: Story
description: Capture actionable sprint work description: Capture actionable sprint work
title: "[Story]: "
labels: ["story"] labels: ["story"]
body: body:
@ -13,13 +12,13 @@ body:
- type: textarea - type: textarea
id: story id: story
attributes: attributes:
label: User Story label: Story
description: | description: |
Please add the "as a, I want, so that" details that describe the user story. Please add the "as a, I want, so that" details that describe the story.
If more than one "as a, I want, so that" describes the story, add multiple. If more than one "as a, I want, so that" describes the story, add multiple.
Example: Example:
As an administrator As an analyst
I want the ability to approve a domain application I want the ability to approve a domain application
so that a request can be fulfilled and a new .gov domain can be provisioned so that a request can be fulfilled and a new .gov domain can be provisioned
value: | value: |
@ -33,23 +32,23 @@ body:
attributes: attributes:
label: Acceptance Criteria label: Acceptance Criteria
description: | description: |
Please add the acceptance criteria using one or more "given, when, then" formulae Please add the acceptance criteria that best describe the desired outcomes when this work is completed
Example: Example:
Given that I am an administrator who has finished reviewing a domain application - Application sends an email when analysts approve domain requests
- Domain application status is "approved"
Example ("given, when, then" format):
Given that I am an analyst who has finished reviewing a domain application
When I click to approve a domain application When I click to approve a domain application
Then the domain provisioning process should be initiated, and the applicant should receive an email update. Then the domain provisioning process should be initiated, and the applicant should receive an email update.
value: |
Given
When
Then
validations: validations:
required: true required: true
- type: textarea - type: textarea
id: additional-context id: additional-context
attributes: attributes:
label: Additional Context (optional) label: Additional Context (optional)
description: "Please include additional references, screenshots, documentation, etc. that are relevant" description: "Please include additional references (screenshots, design links, documentation, etc.) that are relevant"
- type: textarea - type: textarea
id: issue-links id: issue-links
attributes: attributes:

View file

@ -48,6 +48,7 @@ env_db_url = env.dj_db_url("DATABASE_URL")
env_debug = env.bool("DJANGO_DEBUG", default=False) env_debug = env.bool("DJANGO_DEBUG", default=False)
env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG") env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG")
env_base_url = env.str("DJANGO_BASE_URL") env_base_url = env.str("DJANGO_BASE_URL")
env_getgov_public_site_url = env.str("GETGOV_PUBLIC_SITE_URL", "")
secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY", "")) secret_login_key = b64decode(secret("DJANGO_SECRET_LOGIN_KEY", ""))
secret_key = secret("DJANGO_SECRET_KEY") secret_key = secret("DJANGO_SECRET_KEY")
@ -62,8 +63,6 @@ secret_registry_key = b64decode(secret("REGISTRY_KEY", ""))
secret_registry_key_passphrase = secret("REGISTRY_KEY_PASSPHRASE", "") secret_registry_key_passphrase = secret("REGISTRY_KEY_PASSPHRASE", "")
secret_registry_hostname = secret("REGISTRY_HOSTNAME") secret_registry_hostname = secret("REGISTRY_HOSTNAME")
secret_getgov_public_site_url = secret("GETGOV_PUBLIC_SITE_URL", "")
# region: Basic Django Config-----------------------------------------------### # region: Basic Django Config-----------------------------------------------###
# Build paths inside the project like this: BASE_DIR / "subdir". # Build paths inside the project like this: BASE_DIR / "subdir".
@ -517,7 +516,7 @@ STATIC_URL = "public/"
# Base URL of our separate static public website. Used by the # Base URL of our separate static public website. Used by the
# {% public_site_url subdir/path %} template tag # {% public_site_url subdir/path %} template tag
GETGOV_PUBLIC_SITE_URL = secret_getgov_public_site_url GETGOV_PUBLIC_SITE_URL = env_getgov_public_site_url
# endregion # endregion
# region: Registry----------------------------------------------------------### # region: Registry----------------------------------------------------------###

View file

@ -59,6 +59,21 @@ class UserFixture:
"first_name": "Alysia", "first_name": "Alysia",
"last_name": "Broddrick", "last_name": "Broddrick",
}, },
{
"username": "55a3bc26-cd1d-4a5c-a8c0-7e1f561ef7f4",
"first_name": "Michelle",
"last_name": "Rago",
},
{
"username": "8f8e7293-17f7-4716-889b-1990241cbd39",
"first_name": "Katherine",
"last_name": "Osos",
},
{
"username": "70488e0a-e937-4894-a28c-16f5949effd4",
"first_name": "Gaby",
"last_name": "DiSarli",
},
] ]
@classmethod @classmethod

View file

@ -0,0 +1,26 @@
# Generated by Django 4.2.1 on 2023-06-02 17:29
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("registrar", "0025_remove_domain_unique_domain_name_in_registry_and_more"),
]
operations = [
migrations.AlterField(
model_name="domainapplication",
name="address_line2",
field=models.TextField(
blank=True, help_text="Street address line 2", null=True
),
),
migrations.AlterField(
model_name="domaininformation",
name="address_line2",
field=models.TextField(
blank=True, help_text="Street address line 2", null=True
),
),
]

View file

@ -343,8 +343,7 @@ class DomainApplication(TimeStampedModel):
blank=True, blank=True,
help_text="Street address", help_text="Street address",
) )
address_line2 = models.CharField( address_line2 = models.TextField(
max_length=15,
null=True, null=True,
blank=True, blank=True,
help_text="Street address line 2", help_text="Street address line 2",

View file

@ -101,8 +101,7 @@ class DomainInformation(TimeStampedModel):
blank=True, blank=True,
help_text="Street address", help_text="Street address",
) )
address_line2 = models.CharField( address_line2 = models.TextField(
max_length=15,
null=True, null=True,
blank=True, blank=True,
help_text="Street address line 2", help_text="Street address line 2",

View file

@ -4,11 +4,11 @@
{% load static url_helpers %} {% load static url_helpers %}
{% block content %} {% block content %}
<main id="main-content" class="grid-container register-form-step"> <main id="main-content" class="grid-container">
<div class="grid-col desktop:grid-offset-2 desktop:grid-col-8"> <div class="grid-col desktop:grid-offset-2 desktop:grid-col-8">
<h1>Domain request for {{ domainapplication.requested_domain.name }}</h1> <h1>Domain request for {{ domainapplication.requested_domain.name }}</h1>
<div <div
class="usa-summary-box dotgov-status-box margin-top-3" class="usa-summary-box dotgov-status-box margin-top-3 padding-left-2"
role="region" role="region"
aria-labelledby="summary-box-key-information" aria-labelledby="summary-box-key-information"
> >
@ -38,11 +38,11 @@
<div class="grid-col desktop:grid-offset-2 maxw-tablet"> <div class="grid-col desktop:grid-offset-2 maxw-tablet">
<h2 class="text-primary-darker"> Summary of your domain request </h2> <h2 class="text-primary-darker"> Summary of your domain request </h2>
{% with heading_level='h3' %}
{% include "includes/summary_item.html" with title='Type of organization' value=domainapplication.get_organization_type_display %} {% include "includes/summary_item.html" with title='Type of organization' value=domainapplication.get_organization_type_display heading_level=heading_level %}
{% if domainapplication.tribe_name %} {% if domainapplication.tribe_name %}
{% include "includes/summary_item.html" with title='Tribal government' value=domainapplication.tribe_name %} {% include "includes/summary_item.html" with title='Tribal government' value=domainapplication.tribe_name heading_level=heading_level %}
{% if domainapplication.federally_recognized_tribe %} {% if domainapplication.federally_recognized_tribe %}
<p>Federally-recognized tribe</p> <p>Federally-recognized tribe</p>
@ -55,44 +55,46 @@
{% endif %} {% endif %}
{% if domainapplication.get_federal_type_display %} {% if domainapplication.get_federal_type_display %}
{% include "includes/summary_item.html" with title='Federal government branch' value=domainapplication.get_federal_type_display %} {% include "includes/summary_item.html" with title='Federal government branch' value=domainapplication.get_federal_type_display heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.is_election_board %} {% if domainapplication.is_election_board %}
{% include "includes/summary_item.html" with title='Election office' value=domainapplication.is_election_board %} {% include "includes/summary_item.html" with title='Election office' value=domainapplication.is_election_board heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.organization_name %} {% if domainapplication.organization_name %}
{% include "includes/summary_item.html" with title='Organization name and mailing address' value=domainapplication address='true' %} {% include "includes/summary_item.html" with title='Organization name and mailing address' value=domainapplication address='true' heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.type_of_work %} {% if domainapplication.type_of_work %}
{% include "includes/summary_item.html" with title='Type of work' value=domainapplication.type_of_work %} {% include "includes/summary_item.html" with title='Type of work' value=domainapplication.type_of_work heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.more_organization_information %} {% if domainapplication.more_organization_information %}
{% include "includes/summary_item.html" with title='More information about your organization' value=domainapplication.more_organization_information %} {% include "includes/summary_item.html" with title='More information about your organization' value=domainapplication.more_organization_information heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.authorizing_official %} {% if domainapplication.authorizing_official %}
{% include "includes/summary_item.html" with title='Authorizing official' value=domainapplication.authorizing_official contact='true' %} {% include "includes/summary_item.html" with title='Authorizing official' value=domainapplication.authorizing_official contact='true' heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.current_websites.all %} {% if domainapplication.current_websites.all %}
{% include "includes/summary_item.html" with title='Current website for your organization' value=domainapplication.current_websites.all list='true' %} {% include "includes/summary_item.html" with title='Current website for your organization' value=domainapplication.current_websites.all list='true' heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.purpose %} {% if domainapplication.purpose %}
{% include "includes/summary_item.html" with title='Purpose of your domain' value=domainapplication.purpose %} {% include "includes/summary_item.html" with title='Purpose of your domain' value=domainapplication.purpose heading_level=heading_level %}
{% endif %} {% endif %}
{% if domainapplication.submitter %} {% if domainapplication.submitter %}
{% include "includes/summary_item.html" with title='Your contact information' value=domainapplication.submitter contact='true'%} {% include "includes/summary_item.html" with title='Your contact information' value=domainapplication.submitter contact='true' heading_level=heading_level %}
{% endif %} {% endif %}
{% include "includes/summary_item.html" with title='Other employees from your organization' value=domainapplication.other_contacts.all contact='true' list='true' %} {% include "includes/summary_item.html" with title='Other employees from your organization' value=domainapplication.other_contacts.all contact='true' list='true' heading_level=heading_level %}
{% include "includes/summary_item.html" with title='Anything else we should know' value=domainapplication.anything_else|default:"No" %}
{% include "includes/summary_item.html" with title='Anything else we should know' value=domainapplication.anything_else|default:"No" heading_level=heading_level %}
{% endwith %}
</div> </div>
</main> </main>

View file

@ -2,12 +2,25 @@
<section class="summary-item margin-top-3"> <section class="summary-item margin-top-3">
<hr class="" aria-hidden="true" /> <hr class="" aria-hidden="true" />
<h2 class="summary-item__title <div class="display-flex flex-justify">
<div>
{% if heading_level %}
<{{ heading_level }}
{% else %}
<h2
{% endif %}
class="summary-item__title
font-sans-md
text-primary-dark text-semibold text-primary-dark text-semibold
margin-top-0 margin-bottom-05" margin-top-0 margin-bottom-05
padding-right-1"
> >
{{ title }} {{ title }}
{% if heading_level %}
</{{ heading_level }}>
{% else %}
</h2> </h2>
{% endif %}
{% if address %} {% if address %}
{% include "includes/organization_address.html" with organization=value %} {% include "includes/organization_address.html" with organization=value %}
{% elif contact %} {% elif contact %}
@ -24,7 +37,7 @@
{% include "includes/contact.html" with contact=item %}</li> {% include "includes/contact.html" with contact=item %}</li>
{% empty %} {% empty %}
<li>None</li> <li>None</li>
{% endfor %}</ul></p> {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% else %} {% else %}
@ -47,21 +60,29 @@
{% endif %} {% endif %}
{% empty %} {% empty %}
<li>None</li> <li>None</li>
{% endfor %}</ul></p> {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% else %} {% else %}
<p class="margin-top-0"> <p class="margin-top-0 margin-bottom-0">
{% if value %}
{{ value }} {{ value }}
{% else %}
None
{% endif %}
</p> </p>
{% endif %} {% endif %}
</div>
{% if edit_link %} {% if edit_link %}
<div class="text-right">
<a <a
href="{{ edit_link }}" href="{{ edit_link }}"
class="usa-link font-sans-sm"
> >
Edit<span class="sr-only"> {{ title }}</span> Edit<span class="sr-only"> {{ title }}</span>
</a> </a>
</div>
{% endif %} {% endif %}
</div>
</section> </section>

View file

@ -27,6 +27,8 @@
10027 OUTOFSCOPE http://app:8080/public/debug_toolbar/js/toolbar.js 10027 OUTOFSCOPE http://app:8080/public/debug_toolbar/js/toolbar.js
# USWDS.min.js contains suspicious words "query", "select", "from" in ordinary usage # USWDS.min.js contains suspicious words "query", "select", "from" in ordinary usage
10027 OUTOFSCOPE http://app:8080/public/js/uswds.min.js 10027 OUTOFSCOPE http://app:8080/public/js/uswds.min.js
# UNCLEAR WHY THIS ONE IS FAILING. Giving 404 error.
10027 OUTOFSCOPE http://app:8080/public/js/uswds-init.min.js
# get-gov.js contains suspicious word "from" as in `Array.from()` # get-gov.js contains suspicious word "from" as in `Array.from()`
10027 OUTOFSCOPE http://app:8080/public/js/get-gov.js 10027 OUTOFSCOPE http://app:8080/public/js/get-gov.js
10028 FAIL (Open Redirect - Passive/beta) 10028 FAIL (Open Redirect - Passive/beta)