Merge branch 'main' into za/1001-update-to-use-sentence-case

This commit is contained in:
zandercymatics 2023-12-11 08:33:23 -07:00
commit 35f3a9f1c5
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
15 changed files with 118 additions and 12 deletions

View file

@ -0,0 +1,86 @@
**Below is a step by step guide for generating emails (of each type) in our application. These instructions are UI facing, with the assumption that the user has analyst (or above) permissions.**
## Domain Invitation
- Starting Location: Home page
- Workflow: (Domains Table) Manage domain
- Workflow Step: Click "Manage" -> Click "Domain managers" -> Click "Add a domain manager" -> (enter email) -> Click "Add user"
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/domain_invitation.txt)
### Domain Invitation Subject
- Notes: Subject line of the "Domain Invitation" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/domain_invitation_subject.txt)
## Domain Request Withdrawn
- Starting Location: Home page
- Workflow: (Domain requests Table) Manage domain
- Workflow Step: Click "Manage" -> Click "Withdraw request" -> (confirmation prompt) -> Click "Withdraw request" (inside prompt)
- Notes: You can also do this through Django Admin by switching a domain of status "submitted" to "withdrawn", but you need to be the submitter (email listed on Your Contact Information).
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/domain_request_withdrawn.txt)
### Domain Request Withdrawn Subject
- Notes: Subject line of the "Domain Request Withdrawn" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/domain_request_withdrawn_subject.txt)
## Status Change Action Needed
- Starting Location: Django Admin
- Workflow: Analyst Admin
- Workflow Step: Click "Domain applications" -> Click an application with a status of "in review" or "rejected" -> Click status dropdown -> (select "action needed") -> click "Save"
- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create an application, set the status to either "in review" or "rejected" (and click save), then set the status to "action needed". This will send you an email.
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_action_needed.txt)
### Status Change Action Needed Subject
- Notes: Subject line of the "Status Change Action Needed" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_action_needed_subject.txt)
## Status Change in Review
- Starting Location: Django Admin
- Workflow: Analyst Admin
- Workflow Step: Click "Domain applications" -> Click an application with a status of "submitted" -> Click status dropdown -> (select "In review") -> click "Save"
- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create an application, then set the status to "In review". This will send you an email.
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_approved.txt)
### Status Change in Review Subject
- Notes: This is the subject line of the "Status Change In Review" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_in_review_subject.txt)
## Status Change Approved
- Starting Location: Django Admin
- Workflow: Analyst Admin
- Workflow Step: Click "Domain applications" -> Click an application in a status of "submitted", "In review", "rejected", or "ineligible" -> Click status dropdown -> (select "approved") -> click "Save"
- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create an application, then set the status to "approved". This will send you an email.
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_approved.txt)
### Status Change Approved Subject
- Notes: This is the subject line of the "Status Change Approved" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_approved_subject.txt)
## Status Change Rejected
- Starting Location: Django Admin
- Workflow: Analyst Admin
- Workflow Step: Click "Domain applications" -> Click an application in a status of "In review", or "approved" -> Click status dropdown -> (select "rejected") -> click "Save"
- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information). To test this with your own email, you need to create an application, then set the status to "in review" (and click save). Then, go back to the same application and set the status to "rejected". This will send you an email.
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_rejected.txt)
### Status Change Rejected Subject
- Notes: Subject line of the "Status Change Rejected" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/status_change_rejected_subject.txt)
## Submission Confirmation
- Starting Location: Home Page
- Workflow: Start domain request
- Workflow Step: Click "Start a new domain request" -> (fill out the form) -> On the last step ("Review and submit your domain request "), click "Submit your domain request"
- Notes: Note that this will send an email to the submitter (email listed on Your Contact Information)
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/submission_confirmation.txt)
### Submission Confirmation Subject
- Notes: This is the subject line of the "Submission Confirmation Subject" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/submission_confirmation_subject.txt)
## Transition Domain Invitation
- Notes: This email is generated during the migration process, meaning that there is no using-facing method to receive this email. This email will be sent out when the following conditions are true: a) The domain exists in the data that Verisign sent us, b) the transition domain script ran successfully, and c) invitations are sent out
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/transition_domain_invitation.txt)
### Transition Domain Invitation Subject
- Notes: This is the subject line of the "Transition Domain Invitation" email
- [Email Content](https://github.com/cisagov/manage.get.gov/blob/main/src/registrar/templates/emails/transition_domain_invitation_subject.txt)

View file

@ -15,7 +15,7 @@ from epplibwrapper import (
commands,
)
API_BASE_PATH = "/api/v1/available/"
API_BASE_PATH = "/api/v1/available/?domain="
class AvailableViewTest(MockEppLib):

View file

@ -84,6 +84,7 @@ def available(request, domain=""):
Response is a JSON dictionary with the key "available" and value true or
false.
"""
domain = request.GET.get("domain", "")
DraftDomain = apps.get_model("registrar.DraftDomain")
# validate that the given domain could be a domain name and fail early if
# not.

View file

@ -142,7 +142,7 @@ function _checkDomainAvailability(el) {
inlineToast(el.parentElement, el.id, ERROR, response.message);
}
}
fetchJSON(`available/${el.value}`, callback);
fetchJSON(`available/?domain=${el.value}`, callback);
}
/** Call the API to see if the domain is good. */

View file

@ -540,7 +540,7 @@ OIDC_PROVIDERS = {
"response_type": "code",
"scope": ["email", "profile:name", "phone"],
"user_info_request": ["email", "first_name", "last_name", "phone"],
"acr_value": "http://idmanagement.gov/ns/assurance/ial/2",
"acr_value": "http://idmanagement.gov/ns/assurance/ial/1",
},
"client_registration": {
"client_id": "cisa_dotgov_registrar",
@ -557,7 +557,7 @@ OIDC_PROVIDERS = {
"response_type": "code",
"scope": ["email", "profile:name", "phone"],
"user_info_request": ["email", "first_name", "last_name", "phone"],
"acr_value": "http://idmanagement.gov/ns/assurance/ial/2",
"acr_value": "http://idmanagement.gov/ns/assurance/ial/1",
},
"client_registration": {
"client_id": ("urn:gov:cisa:openidconnect.profiles:sp:sso:cisa:dotgov_registrar"),

View file

@ -73,7 +73,7 @@ urlpatterns = [
path("health/", views.health),
path("openid/", include("djangooidc.urls")),
path("register/", include((application_urls, APPLICATION_NAMESPACE))),
path("api/v1/available/<domain>", available, name="available"),
path("api/v1/available/", available, name="available"),
path("api/v1/get-report/current-federal", get_current_federal, name="get-current-federal"),
path("api/v1/get-report/current-full", get_current_full, name="get-current-full"),
path(

View file

@ -38,6 +38,7 @@ auditlog.register(DomainApplication)
auditlog.register(Domain)
auditlog.register(DraftDomain)
auditlog.register(DomainInvitation)
auditlog.register(DomainInformation)
auditlog.register(HostIP)
auditlog.register(Host)
auditlog.register(Nameserver)

View file

@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% load static %}
{% block title %}Thanks for your domain request!{% endblock %}
{% block title %}Thanks for your domain request! | {% endblock %}
{% block content %}
<main id="main-content" class="grid-container register-form-step">

View file

@ -1,6 +1,6 @@
{% extends 'base.html' %}
{% block title %}Withdraw request for {{ domainapplication.requested_domain.name }}{% endblock %}
{% block title %}Withdraw request for {{ domainapplication.requested_domain.name }} | {% endblock %}
{% load static url_helpers %}
{% block content %}

View file

@ -149,7 +149,7 @@
{% block logo %}
<div class="usa-logo display-inline-block" id="extended-logo">
<strong class="usa-logo__text" >
<a href="{% url 'home' %}">.gov registrar </a>
<a href="{% url 'home' %}">.gov Registrar </a>
</strong>
</div>
{% endblock %}

View file

@ -1,7 +1,7 @@
{% extends "domain_base.html" %}
{% load static field_helpers %}
{% block title %}Add another user{% endblock %}
{% block title %}Add another user | {% endblock %}
{% block domain_content %}
<h1>Add a domain manager</h1>

View file

@ -2,7 +2,7 @@
{% load static %}
{% block title %} Hello {% endblock %}
{% block title %} Home | {% endblock %}
{% block content %}
<main id="main-content" class="grid-container">

View file

@ -1,7 +1,7 @@
{% extends 'base.html' %}
{% block title %}
Edit your User Profile
Edit your User Profile |
{% endblock title %}
{% block content %}

View file

@ -74,6 +74,24 @@ class TestFormValidation(MockEppLib):
["Enter the .gov domain you want without any periods."],
)
def test_requested_domain_two_dots_invalid(self):
"""don't accept domains that are subdomains"""
form = DotGovDomainForm(data={"requested_domain": "sub.top-level-agency.gov"})
self.assertEqual(
form.errors["requested_domain"],
["Enter the .gov domain you want without any periods."],
)
form = DotGovDomainForm(data={"requested_domain": ".top-level-agency.gov"})
self.assertEqual(
form.errors["requested_domain"],
["Enter the .gov domain you want without any periods."],
)
form = DotGovDomainForm(data={"requested_domain": "..gov"})
self.assertEqual(
form.errors["requested_domain"],
["Enter the .gov domain you want without any periods."],
)
def test_requested_domain_invalid_characters(self):
"""must be a valid .gov domain name."""
form = DotGovDomainForm(data={"requested_domain": "underscores_forever"})

View file

@ -110,7 +110,7 @@ class TestURLAuth(TestCase):
"/openid/callback",
"/openid/callback/login/",
"/openid/callback/logout/",
"/api/v1/available/whitehouse.gov",
"/api/v1/available/",
"/api/v1/get-report/current-federal",
"/api/v1/get-report/current-full",
]