mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-12 12:39:43 +02:00
Merge remote-tracking branch 'origin' into rh/1261-hide-urbanization
This commit is contained in:
commit
1b226a470c
10 changed files with 83 additions and 52 deletions
|
@ -53,6 +53,7 @@ jobs:
|
||||||
- name: Compile USWDS assets
|
- name: Compile USWDS assets
|
||||||
working-directory: ./src
|
working-directory: ./src
|
||||||
run: |
|
run: |
|
||||||
|
docker compose run node npm install npm@latest &&
|
||||||
docker compose run node npm install &&
|
docker compose run node npm install &&
|
||||||
docker compose run node npx gulp copyAssets &&
|
docker compose run node npx gulp copyAssets &&
|
||||||
docker compose run node npx gulp compile
|
docker compose run node npx gulp compile
|
||||||
|
|
1
.github/workflows/deploy-development.yaml
vendored
1
.github/workflows/deploy-development.yaml
vendored
|
@ -22,6 +22,7 @@ jobs:
|
||||||
- name: Compile USWDS assets
|
- name: Compile USWDS assets
|
||||||
working-directory: ./src
|
working-directory: ./src
|
||||||
run: |
|
run: |
|
||||||
|
docker compose run node npm install npm@latest &&
|
||||||
docker compose run node npm install &&
|
docker compose run node npm install &&
|
||||||
docker compose run node npx gulp copyAssets &&
|
docker compose run node npx gulp copyAssets &&
|
||||||
docker compose run node npx gulp compile
|
docker compose run node npx gulp compile
|
||||||
|
|
1
.github/workflows/deploy-sandbox.yaml
vendored
1
.github/workflows/deploy-sandbox.yaml
vendored
|
@ -47,6 +47,7 @@ jobs:
|
||||||
- name: Compile USWDS assets
|
- name: Compile USWDS assets
|
||||||
working-directory: ./src
|
working-directory: ./src
|
||||||
run: |
|
run: |
|
||||||
|
docker compose run node npm install npm@latest &&
|
||||||
docker compose run node npm install &&
|
docker compose run node npm install &&
|
||||||
docker compose run node npx gulp copyAssets &&
|
docker compose run node npx gulp copyAssets &&
|
||||||
docker compose run node npx gulp compile
|
docker compose run node npx gulp compile
|
||||||
|
|
18
.github/workflows/issue-label-notifier.yaml
vendored
Normal file
18
.github/workflows/issue-label-notifier.yaml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
name: Notify users based on issue labels
|
||||||
|
|
||||||
|
on:
|
||||||
|
issues:
|
||||||
|
types: [labeled]
|
||||||
|
pull_request:
|
||||||
|
types: [labeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
notify:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: jenschelkopf/issue-label-notification-action@1.3
|
||||||
|
with:
|
||||||
|
recipients: |
|
||||||
|
design-review=@Katherine-Osos
|
||||||
|
message: 'cc/ {recipients} — adding you to this **{label}** issue!'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
@use "uswds-core" as *;
|
@use "uswds-core" as *;
|
||||||
|
|
||||||
.dotgov-table {
|
.dotgov-table a,
|
||||||
a {
|
.usa-link--icon {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
color: color('primary');
|
color: color('primary');
|
||||||
|
@ -9,10 +9,6 @@
|
||||||
&:visited {
|
&:visited {
|
||||||
color: color('primary');
|
color: color('primary');
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
.usa-icon {
|
.usa-icon {
|
||||||
// align icon with x height
|
// align icon with x height
|
||||||
margin-top: units(0.5);
|
margin-top: units(0.5);
|
||||||
|
|
|
@ -42,13 +42,11 @@ Your domain request was rejected because we determined that {{ domain_request.or
|
||||||
eligible for a .gov domain. .Gov domains are only available to official U.S.-based
|
eligible for a .gov domain. .Gov domains are only available to official U.S.-based
|
||||||
government organizations.
|
government organizations.
|
||||||
|
|
||||||
|
Learn more about eligibility for .gov domains
|
||||||
|
<https://get.gov/domains/eligibility/>.
|
||||||
|
|
||||||
DEMONSTRATE ELIGIBILITY
|
If you have questions or comments, reply to this email.
|
||||||
If you can provide documentation that demonstrates your eligibility, reply to this email.
|
{% elif domain_request.rejection_reason == 'naming_not_met' %}
|
||||||
This can include links to (or copies of) your authorizing legislation, your founding
|
|
||||||
charter or bylaws, or other similar documentation. Without this, we can’t approve a
|
|
||||||
.gov domain for your organization. Learn more about eligibility for .gov domains
|
|
||||||
<https://get.gov/domains/eligibility/>.{% elif domain_request.rejection_reason == 'naming_not_met' %}
|
|
||||||
Your domain request was rejected because it does not meet our naming requirements.
|
Your domain request was rejected because it does not meet our naming requirements.
|
||||||
Domains should uniquely identify a government organization and be clear to the
|
Domains should uniquely identify a government organization and be clear to the
|
||||||
general public. Learn more about naming requirements for your type of organization
|
general public. Learn more about naming requirements for your type of organization
|
||||||
|
|
|
@ -156,7 +156,7 @@
|
||||||
<div class="domains__no-data display-none">
|
<div class="domains__no-data display-none">
|
||||||
<p>You don't have any registered domains.</p>
|
<p>You don't have any registered domains.</p>
|
||||||
<p class="maxw-none clearfix">
|
<p class="maxw-none clearfix">
|
||||||
<a href="https://get.gov/help/faq/#do-not-see-my-domain" class="float-right-tablet display-flex flex-align-start usa-link" target="_blank">
|
<a href="https://get.gov/help/faq/#do-not-see-my-domain" class="float-right-tablet usa-link usa-link--icon" target="_blank">
|
||||||
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
||||||
<use xlink:href="{%static 'img/sprite.svg'%}#help_outline"></use>
|
<use xlink:href="{%static 'img/sprite.svg'%}#help_outline"></use>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
@ -112,8 +112,11 @@
|
||||||
<div class="text-right">
|
<div class="text-right">
|
||||||
<a
|
<a
|
||||||
href="{{ edit_link }}"
|
href="{{ edit_link }}"
|
||||||
class="usa-link font-sans-sm"
|
class="usa-link usa-link--icon font-sans-sm line-height-sans-5"
|
||||||
>
|
>
|
||||||
|
<svg class="usa-icon" aria-hidden="true" focusable="false" role="img" width="24">
|
||||||
|
<use xlink:href="{% static 'img/sprite.svg' %}#edit"></use>
|
||||||
|
</svg>
|
||||||
Edit<span class="sr-only"> {{ title }}</span>
|
Edit<span class="sr-only"> {{ title }}</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -47,10 +47,10 @@ class CsvReportsTest(MockDb):
|
||||||
fake_open = mock_open()
|
fake_open = mock_open()
|
||||||
expected_file_content = [
|
expected_file_content = [
|
||||||
call("Domain name,Domain type,Agency,Organization name,City,State,Security contact email\r\n"),
|
call("Domain name,Domain type,Agency,Organization name,City,State,Security contact email\r\n"),
|
||||||
call("cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,\r\n"),
|
call("cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\r\n"),
|
||||||
call("cdomain1.gov,Federal - Executive,World War I Centennial Commission,,,,\r\n"),
|
call("cdomain1.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\r\n"),
|
||||||
call("adomain10.gov,Federal,Armed Forces Retirement Home,,,,\r\n"),
|
call("adomain10.gov,Federal,Armed Forces Retirement Home,,,,(blank)\r\n"),
|
||||||
call("ddomain3.gov,Federal,Armed Forces Retirement Home,,,,\r\n"),
|
call("ddomain3.gov,Federal,Armed Forces Retirement Home,,,,(blank)\r\n"),
|
||||||
]
|
]
|
||||||
# We don't actually want to write anything for a test case,
|
# We don't actually want to write anything for a test case,
|
||||||
# we just want to verify what is being written.
|
# we just want to verify what is being written.
|
||||||
|
@ -69,12 +69,12 @@ class CsvReportsTest(MockDb):
|
||||||
fake_open = mock_open()
|
fake_open = mock_open()
|
||||||
expected_file_content = [
|
expected_file_content = [
|
||||||
call("Domain name,Domain type,Agency,Organization name,City,State,Security contact email\r\n"),
|
call("Domain name,Domain type,Agency,Organization name,City,State,Security contact email\r\n"),
|
||||||
call("cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,\r\n"),
|
call("cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\r\n"),
|
||||||
call("cdomain1.gov,Federal - Executive,World War I Centennial Commission,,,,\r\n"),
|
call("cdomain1.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\r\n"),
|
||||||
call("adomain10.gov,Federal,Armed Forces Retirement Home,,,,\r\n"),
|
call("adomain10.gov,Federal,Armed Forces Retirement Home,,,,(blank)\r\n"),
|
||||||
call("ddomain3.gov,Federal,Armed Forces Retirement Home,,,,\r\n"),
|
call("ddomain3.gov,Federal,Armed Forces Retirement Home,,,,(blank)\r\n"),
|
||||||
call("adomain2.gov,Interstate,,,,,\r\n"),
|
call("adomain2.gov,Interstate,,,,,(blank)\r\n"),
|
||||||
call("zdomain12.gov,Interstate,,,,,\r\n"),
|
call("zdomain12.gov,Interstate,,,,,(blank)\r\n"),
|
||||||
]
|
]
|
||||||
# We don't actually want to write anything for a test case,
|
# We don't actually want to write anything for a test case,
|
||||||
# we just want to verify what is being written.
|
# we just want to verify what is being written.
|
||||||
|
@ -234,29 +234,30 @@ class ExportDataTest(MockDb, MockEppLib):
|
||||||
expected_content = (
|
expected_content = (
|
||||||
"Domain name,Status,First ready on,Expiration date,Domain type,Agency,Organization name,City,State,SO,"
|
"Domain name,Status,First ready on,Expiration date,Domain type,Agency,Organization name,City,State,SO,"
|
||||||
"SO email,Security contact email,Domain managers,Invited domain managers\n"
|
"SO email,Security contact email,Domain managers,Invited domain managers\n"
|
||||||
"cdomain11.gov,Ready,2024-04-02,(blank),Federal - Executive,World War I Centennial Commission,,,, ,,,"
|
"cdomain11.gov,Ready,2024-04-02,(blank),Federal - Executive,World War I Centennial Commission,,,,(blank),,,"
|
||||||
"meoward@rocks.com,\n"
|
"meoward@rocks.com,\n"
|
||||||
"defaultsecurity.gov,Ready,2023-11-01,(blank),Federal - Executive,World War I Centennial Commission,,,"
|
"defaultsecurity.gov,Ready,2023-11-01,(blank),Federal - Executive,World War I Centennial Commission,,,"
|
||||||
', ,,dotgov@cisa.dhs.gov,"meoward@rocks.com, info@example.com, big_lebowski@dude.co",'
|
',,,(blank),"meoward@rocks.com, info@example.com, big_lebowski@dude.co",'
|
||||||
"woofwardthethird@rocks.com\n"
|
"woofwardthethird@rocks.com\n"
|
||||||
"adomain10.gov,Ready,2024-04-03,(blank),Federal,Armed Forces Retirement Home,,,, ,,,,"
|
"adomain10.gov,Ready,2024-04-03,(blank),Federal,Armed Forces Retirement Home,,,,(blank),,,,"
|
||||||
"squeaker@rocks.com\n"
|
"squeaker@rocks.com\n"
|
||||||
"bdomain4.gov,Unknown,(blank),(blank),Federal,Armed Forces Retirement Home,,,, ,,,,\n"
|
"bdomain4.gov,Unknown,(blank),(blank),Federal,Armed Forces Retirement Home,,,,(blank),,,,\n"
|
||||||
"bdomain5.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,, ,,,,\n"
|
"bdomain5.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,,(blank),,,,\n"
|
||||||
"bdomain6.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,, ,,,,\n"
|
"bdomain6.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,,(blank),,,,\n"
|
||||||
"ddomain3.gov,On hold,(blank),2023-11-15,Federal,Armed Forces Retirement Home,,,, ,,"
|
"ddomain3.gov,On hold,(blank),2023-11-15,Federal,Armed Forces Retirement Home,,,,,,"
|
||||||
"security@mail.gov,,\n"
|
"security@mail.gov,,\n"
|
||||||
"sdomain8.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,, ,,,,\n"
|
"sdomain8.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,,(blank),,,,\n"
|
||||||
"xdomain7.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,, ,,,,\n"
|
"xdomain7.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,,(blank),,,,\n"
|
||||||
"zdomain9.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,, ,,,,\n"
|
"zdomain9.gov,Deleted,(blank),(blank),Federal,Armed Forces Retirement Home,,,,(blank),,,,\n"
|
||||||
"adomain2.gov,Dns needed,(blank),(blank),Interstate,,,,, ,,registrar@dotgov.gov,"
|
"adomain2.gov,Dns needed,(blank),(blank),Interstate,,,,,(blank),,,"
|
||||||
"meoward@rocks.com,squeaker@rocks.com\n"
|
"meoward@rocks.com,squeaker@rocks.com\n"
|
||||||
"zdomain12.gov,Ready,2024-04-02,(blank),Interstate,,,,, ,,,meoward@rocks.com,\n"
|
"zdomain12.gov,Ready,2024-04-02,(blank),Interstate,,,,,(blank),,,meoward@rocks.com,\n"
|
||||||
)
|
)
|
||||||
# Normalize line endings and remove commas,
|
# Normalize line endings and remove commas,
|
||||||
# spaces and leading/trailing whitespace
|
# spaces and leading/trailing whitespace
|
||||||
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
||||||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
||||||
|
self.maxDiff = None
|
||||||
self.assertEqual(csv_content, expected_content)
|
self.assertEqual(csv_content, expected_content)
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
|
@ -286,17 +287,18 @@ class ExportDataTest(MockDb, MockEppLib):
|
||||||
# sorted alphabetially by domain name
|
# sorted alphabetially by domain name
|
||||||
expected_content = (
|
expected_content = (
|
||||||
"Domain name,Domain type,Agency,Organization name,City,State,Security contact email\n"
|
"Domain name,Domain type,Agency,Organization name,City,State,Security contact email\n"
|
||||||
"cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,\n"
|
"cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\n"
|
||||||
"defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,,,,dotgov@cisa.dhs.gov\n"
|
"defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\n"
|
||||||
"adomain10.gov,Federal,Armed Forces Retirement Home,,,,\n"
|
"adomain10.gov,Federal,Armed Forces Retirement Home,,,,(blank)\n"
|
||||||
"ddomain3.gov,Federal,Armed Forces Retirement Home,,,,security@mail.gov\n"
|
"ddomain3.gov,Federal,Armed Forces Retirement Home,,,,security@mail.gov\n"
|
||||||
"adomain2.gov,Interstate,,,,,registrar@dotgov.gov\n"
|
"adomain2.gov,Interstate,,,,,(blank)\n"
|
||||||
"zdomain12.gov,Interstate,,,,,\n"
|
"zdomain12.gov,Interstate,,,,,(blank)\n"
|
||||||
)
|
)
|
||||||
# Normalize line endings and remove commas,
|
# Normalize line endings and remove commas,
|
||||||
# spaces and leading/trailing whitespace
|
# spaces and leading/trailing whitespace
|
||||||
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
||||||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
||||||
|
self.maxDiff = None
|
||||||
self.assertEqual(csv_content, expected_content)
|
self.assertEqual(csv_content, expected_content)
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
|
@ -326,15 +328,16 @@ class ExportDataTest(MockDb, MockEppLib):
|
||||||
# sorted alphabetially by domain name
|
# sorted alphabetially by domain name
|
||||||
expected_content = (
|
expected_content = (
|
||||||
"Domain name,Domain type,Agency,Organization name,City,State,Security contact email\n"
|
"Domain name,Domain type,Agency,Organization name,City,State,Security contact email\n"
|
||||||
"cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,\n"
|
"cdomain11.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\n"
|
||||||
"defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,,,,dotgov@cisa.dhs.gov\n"
|
"defaultsecurity.gov,Federal - Executive,World War I Centennial Commission,,,,(blank)\n"
|
||||||
"adomain10.gov,Federal,Armed Forces Retirement Home,,,,\n"
|
"adomain10.gov,Federal,Armed Forces Retirement Home,,,,(blank)\n"
|
||||||
"ddomain3.gov,Federal,Armed Forces Retirement Home,,,,security@mail.gov\n"
|
"ddomain3.gov,Federal,Armed Forces Retirement Home,,,,security@mail.gov\n"
|
||||||
)
|
)
|
||||||
# Normalize line endings and remove commas,
|
# Normalize line endings and remove commas,
|
||||||
# spaces and leading/trailing whitespace
|
# spaces and leading/trailing whitespace
|
||||||
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
csv_content = csv_content.replace(",,", "").replace(",", "").replace(" ", "").replace("\r\n", "\n").strip()
|
||||||
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
expected_content = expected_content.replace(",,", "").replace(",", "").replace(" ", "").strip()
|
||||||
|
self.maxDiff = None
|
||||||
self.assertEqual(csv_content, expected_content)
|
self.assertEqual(csv_content, expected_content)
|
||||||
|
|
||||||
@less_console_noise_decorator
|
@less_console_noise_decorator
|
||||||
|
|
|
@ -18,6 +18,7 @@ from django.contrib.postgres.aggregates import StringAgg
|
||||||
from registrar.models.utility.generic_helper import convert_queryset_to_dict
|
from registrar.models.utility.generic_helper import convert_queryset_to_dict
|
||||||
from registrar.templatetags.custom_filters import get_region
|
from registrar.templatetags.custom_filters import get_region
|
||||||
from registrar.utility.constants import BranchChoices
|
from registrar.utility.constants import BranchChoices
|
||||||
|
from registrar.utility.enums import DefaultEmail
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -371,6 +372,15 @@ class DomainExport(BaseExport):
|
||||||
if domain_federal_type and domain_org_type == DomainRequest.OrgChoicesElectionOffice.FEDERAL:
|
if domain_federal_type and domain_org_type == DomainRequest.OrgChoicesElectionOffice.FEDERAL:
|
||||||
domain_type = f"{human_readable_domain_org_type} - {human_readable_domain_federal_type}"
|
domain_type = f"{human_readable_domain_org_type} - {human_readable_domain_federal_type}"
|
||||||
|
|
||||||
|
security_contact_email = model.get("security_contact_email")
|
||||||
|
invalid_emails = {DefaultEmail.LEGACY_DEFAULT.value, DefaultEmail.PUBLIC_CONTACT_DEFAULT.value}
|
||||||
|
if (
|
||||||
|
not security_contact_email
|
||||||
|
or not isinstance(security_contact_email, str)
|
||||||
|
or security_contact_email.lower().strip() in invalid_emails
|
||||||
|
):
|
||||||
|
security_contact_email = "(blank)"
|
||||||
|
|
||||||
# create a dictionary of fields which can be included in output.
|
# create a dictionary of fields which can be included in output.
|
||||||
# "extra_fields" are precomputed fields (generated in the DB or parsed).
|
# "extra_fields" are precomputed fields (generated in the DB or parsed).
|
||||||
FIELDS = {
|
FIELDS = {
|
||||||
|
@ -385,7 +395,7 @@ class DomainExport(BaseExport):
|
||||||
"State": model.get("state_territory"),
|
"State": model.get("state_territory"),
|
||||||
"SO": model.get("so_name"),
|
"SO": model.get("so_name"),
|
||||||
"SO email": model.get("senior_official__email"),
|
"SO email": model.get("senior_official__email"),
|
||||||
"Security contact email": model.get("security_contact_email"),
|
"Security contact email": security_contact_email,
|
||||||
"Created at": model.get("domain__created_at"),
|
"Created at": model.get("domain__created_at"),
|
||||||
"Deleted": model.get("domain__deleted"),
|
"Deleted": model.get("domain__deleted"),
|
||||||
"Domain managers": model.get("managers"),
|
"Domain managers": model.get("managers"),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue