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
description: Report a bug
title: "[Bug]: "
description: Report a bug or problem with the application
labels: ["bug"]
body:
@ -56,4 +55,14 @@ body:
id: additional-context
attributes:
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
title: "[Story]: "
labels: ["story"]
body:
@ -13,13 +12,13 @@ body:
- type: textarea
id: story
attributes:
label: User Story
label: Story
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.
Example:
As an administrator
As an analyst
I want the ability to approve a domain application
so that a request can be fulfilled and a new .gov domain can be provisioned
value: |
@ -33,23 +32,23 @@ body:
attributes:
label: Acceptance Criteria
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:
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
Then the domain provisioning process should be initiated, and the applicant should receive an email update.
value: |
Given
When
Then
validations:
required: true
- type: textarea
id: additional-context
attributes:
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:

View file

@ -48,6 +48,7 @@ env_db_url = env.dj_db_url("DATABASE_URL")
env_debug = env.bool("DJANGO_DEBUG", default=False)
env_log_level = env.str("DJANGO_LOG_LEVEL", "DEBUG")
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_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_hostname = secret("REGISTRY_HOSTNAME")
secret_getgov_public_site_url = secret("GETGOV_PUBLIC_SITE_URL", "")
# region: Basic Django Config-----------------------------------------------###
# 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
# {% 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
# region: Registry----------------------------------------------------------###

View file

@ -59,6 +59,21 @@ class UserFixture:
"first_name": "Alysia",
"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

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,
help_text="Street address",
)
address_line2 = models.CharField(
max_length=15,
address_line2 = models.TextField(
null=True,
blank=True,
help_text="Street address line 2",

View file

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

View file

@ -4,11 +4,11 @@
{% load static url_helpers %}
{% 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">
<h1>Domain request for {{ domainapplication.requested_domain.name }}</h1>
<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"
aria-labelledby="summary-box-key-information"
>
@ -38,11 +38,11 @@
<div class="grid-col desktop:grid-offset-2 maxw-tablet">
<h2 class="text-primary-darker"> Summary of your domain request </h2>
{% include "includes/summary_item.html" with title='Type of organization' value=domainapplication.get_organization_type_display %}
{% with heading_level='h3' %}
{% include "includes/summary_item.html" with title='Type of organization' value=domainapplication.get_organization_type_display heading_level=heading_level %}
{% 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 %}
<p>Federally-recognized tribe</p>
@ -55,44 +55,46 @@
{% endif %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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 %}
{% 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='Anything else we should know' value=domainapplication.anything_else|default:"No" %}
{% 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" heading_level=heading_level %}
{% endwith %}
</div>
</main>

View file

@ -2,66 +2,87 @@
<section class="summary-item margin-top-3">
<hr class="" aria-hidden="true" />
<h2 class="summary-item__title
text-primary-dark text-semibold
margin-top-0 margin-bottom-05"
>
{{ title }}
</h2>
{% if address %}
{% include "includes/organization_address.html" with organization=value %}
{% elif contact %}
{% if list %}
{% if value|length == 1 %}
{% include "includes/contact.html" with contact=value|first %}
<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
margin-top-0 margin-bottom-05
padding-right-1"
>
{{ title }}
{% if heading_level %}
</{{ heading_level }}>
{% else %}
</h2>
{% endif %}
{% if address %}
{% include "includes/organization_address.html" with organization=value %}
{% elif contact %}
{% if list %}
{% if value|length == 1 %}
{% include "includes/contact.html" with contact=value|first %}
{% else %}
<ul class="usa-list usa-list--unstyled margin-top-0">
{% for item in value %}
<li>
<p class="text-semibold margin-top-1 margin-bottom-0">
Contact {{forloop.counter}}
</p>
{% include "includes/contact.html" with contact=item %}</li>
{% empty %}
<li>None</li>
{% endfor %}
</ul>
{% endif %}
{% else %}
{% include "includes/contact.html" with contact=value %}
{% endif %}
{% elif list %}
{% if value|length == 1 %}
{% if users %}
<p class="margin-top-0">{{ value.0.user.email }} </p>
{% else %}
<p class="margin-top-0">{{ value | first }} </p>
{% endif %}
{% else %}
<ul class="usa-list margin-top-0">
{% for item in value %}
{% if users %}
<li>{{ item.user.email }}</li>
{% else %}
<li>{{ item }}</li>
{% endif %}
{% empty %}
<li>None</li>
{% endfor %}
</ul>
{% endif %}
{% else %}
<ul class="usa-list usa-list--unstyled margin-top-0">
{% for item in value %}
<li>
<p class="text-semibold margin-top-1 margin-bottom-0">
Contact {{forloop.counter}}
</p>
{% include "includes/contact.html" with contact=item %}</li>
{% empty %}
<li>None</li>
{% endfor %}</ul></p>
</ul>
<p class="margin-top-0 margin-bottom-0">
{% if value %}
{{ value }}
{% else %}
None
{% endif %}
</p>
{% endif %}
{% else %}
{% include "includes/contact.html" with contact=value %}
{% endif %}
{% elif list %}
{% if value|length == 1 %}
{% if users %}
<p class="margin-top-0">{{ value.0.user.email }} </p>
{% else %}
<p class="margin-top-0">{{ value | first }} </p>
{% endif %}
{% else %}
<ul class="usa-list margin-top-0">
{% for item in value %}
{% if users %}
<li>{{ item.user.email }}</li>
{% else %}
<li>{{ item }}</li>
{% endif %}
{% empty %}
<li>None</li>
{% endfor %}</ul></p>
</ul>
{% endif %}
{% else %}
<p class="margin-top-0">
{{ value }}
</p>
{% endif %}
</div>
{% if edit_link %}
<a
href="{{ edit_link }}"
>
Edit<span class="sr-only"> {{ title }}</span>
</a>
<div class="text-right">
<a
href="{{ edit_link }}"
class="usa-link font-sans-sm"
>
Edit<span class="sr-only"> {{ title }}</span>
</a>
</div>
{% endif %}
</div>
</section>

View file

@ -27,6 +27,8 @@
10027 OUTOFSCOPE http://app:8080/public/debug_toolbar/js/toolbar.js
# USWDS.min.js contains suspicious words "query", "select", "from" in ordinary usage
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()`
10027 OUTOFSCOPE http://app:8080/public/js/get-gov.js
10028 FAIL (Open Redirect - Passive/beta)