mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-13 21:19:42 +02:00
Merge remote-tracking branch 'origin/main' into nl/1780-check-SES-before-adding-user
This commit is contained in:
commit
1632f4df1f
9 changed files with 609 additions and 6063 deletions
|
@ -33,4 +33,5 @@ exports.init = uswds.init;
|
||||||
exports.compile = uswds.compile;
|
exports.compile = uswds.compile;
|
||||||
exports.watch = uswds.watch;
|
exports.watch = uswds.watch;
|
||||||
exports.copyAssets = uswds.copyAssets
|
exports.copyAssets = uswds.copyAssets
|
||||||
|
exports.updateUswds = uswds.updateUswds
|
||||||
|
|
6612
src/package-lock.json
generated
6612
src/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -15,7 +15,7 @@
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uswds/uswds": "^3.3.0",
|
"@uswds/uswds": "^3.8.0",
|
||||||
"pa11y-ci": "^3.0.1",
|
"pa11y-ci": "^3.0.1",
|
||||||
"sass": "^1.54.8"
|
"sass": "^1.54.8"
|
||||||
},
|
},
|
||||||
|
|
|
@ -594,7 +594,7 @@ class MyUserAdmin(BaseUserAdmin, ImportExportModelAdmin):
|
||||||
None,
|
None,
|
||||||
{"fields": ("username", "password", "status", "verification_type")},
|
{"fields": ("username", "password", "status", "verification_type")},
|
||||||
),
|
),
|
||||||
("Personal Info", {"fields": ("first_name", "last_name", "email")}),
|
("Personal Info", {"fields": ("first_name", "middle_name", "last_name", "email", "title")}),
|
||||||
(
|
(
|
||||||
"Permissions",
|
"Permissions",
|
||||||
{
|
{
|
||||||
|
@ -625,7 +625,7 @@ class MyUserAdmin(BaseUserAdmin, ImportExportModelAdmin):
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
("Personal Info", {"fields": ("first_name", "last_name", "email")}),
|
("Personal Info", {"fields": ("first_name", "middle_name", "last_name", "email", "title")}),
|
||||||
(
|
(
|
||||||
"Permissions",
|
"Permissions",
|
||||||
{
|
{
|
||||||
|
@ -651,7 +651,9 @@ class MyUserAdmin(BaseUserAdmin, ImportExportModelAdmin):
|
||||||
analyst_readonly_fields = [
|
analyst_readonly_fields = [
|
||||||
"Personal Info",
|
"Personal Info",
|
||||||
"first_name",
|
"first_name",
|
||||||
|
"middle_name",
|
||||||
"last_name",
|
"last_name",
|
||||||
|
"title",
|
||||||
"email",
|
"email",
|
||||||
"Permissions",
|
"Permissions",
|
||||||
"is_active",
|
"is_active",
|
||||||
|
@ -1171,7 +1173,7 @@ class DomainInformationAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
]
|
]
|
||||||
|
|
||||||
# Readonly fields for analysts and superusers
|
# Readonly fields for analysts and superusers
|
||||||
readonly_fields = ("other_contacts", "generic_org_type", "is_election_board")
|
readonly_fields = ("other_contacts", "generic_org_type", "is_election_board", "federal_agency")
|
||||||
|
|
||||||
# Read only that we'll leverage for CISA Analysts
|
# Read only that we'll leverage for CISA Analysts
|
||||||
analyst_readonly_fields = [
|
analyst_readonly_fields = [
|
||||||
|
@ -1438,6 +1440,7 @@ class DomainRequestAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
"alternative_domains",
|
"alternative_domains",
|
||||||
"generic_org_type",
|
"generic_org_type",
|
||||||
"is_election_board",
|
"is_election_board",
|
||||||
|
"federal_agency",
|
||||||
)
|
)
|
||||||
|
|
||||||
# Read only that we'll leverage for CISA Analysts
|
# Read only that we'll leverage for CISA Analysts
|
||||||
|
@ -1879,7 +1882,7 @@ class DomainAdmin(ListHeaderAdmin, ImportExportModelAdmin):
|
||||||
search_fields = ["name"]
|
search_fields = ["name"]
|
||||||
search_help_text = "Search by domain name."
|
search_help_text = "Search by domain name."
|
||||||
change_form_template = "django/admin/domain_change_form.html"
|
change_form_template = "django/admin/domain_change_form.html"
|
||||||
readonly_fields = ["state", "expiration_date", "first_ready", "deleted"]
|
readonly_fields = ("state", "expiration_date", "first_ready", "deleted", "federal_agency")
|
||||||
|
|
||||||
# Table ordering
|
# Table ordering
|
||||||
ordering = ["name"]
|
ordering = ["name"]
|
||||||
|
|
23
src/registrar/migrations/0095_user_middle_name_user_title.py
Normal file
23
src/registrar/migrations/0095_user_middle_name_user_title.py
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 4.2.10 on 2024-05-22 14:54
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
("registrar", "0094_create_groups_v12"),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="user",
|
||||||
|
name="middle_name",
|
||||||
|
field=models.CharField(blank=True, null=True),
|
||||||
|
),
|
||||||
|
migrations.AddField(
|
||||||
|
model_name="user",
|
||||||
|
name="title",
|
||||||
|
field=models.CharField(blank=True, null=True, verbose_name="title / role"),
|
||||||
|
),
|
||||||
|
]
|
|
@ -80,6 +80,17 @@ class User(AbstractUser):
|
||||||
db_index=True,
|
db_index=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
middle_name = models.CharField(
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
title = models.CharField(
|
||||||
|
null=True,
|
||||||
|
blank=True,
|
||||||
|
verbose_name="title / role",
|
||||||
|
)
|
||||||
|
|
||||||
verification_type = models.CharField(
|
verification_type = models.CharField(
|
||||||
choices=VerificationTypeChoices.choices,
|
choices=VerificationTypeChoices.choices,
|
||||||
null=True,
|
null=True,
|
||||||
|
|
|
@ -81,7 +81,7 @@
|
||||||
<div class="grid-col-auto">
|
<div class="grid-col-auto">
|
||||||
<img class="usa-banner__header-flag" src="{% static 'img/us_flag_small.png' %}" alt="U.S. flag" />
|
<img class="usa-banner__header-flag" src="{% static 'img/us_flag_small.png' %}" alt="U.S. flag" />
|
||||||
</div>
|
</div>
|
||||||
<div class="grid-col-fill tablet:grid-col-auto">
|
<div class="grid-col-fill tablet:grid-col-auto" aria-hidden="true">
|
||||||
<p class="usa-banner__header-text">
|
<p class="usa-banner__header-text">
|
||||||
An official website of the United States government
|
An official website of the United States government
|
||||||
</p>
|
</p>
|
||||||
|
|
|
@ -93,7 +93,7 @@
|
||||||
</li>
|
</li>
|
||||||
<li class="usa-identifier__required-links-item">
|
<li class="usa-identifier__required-links-item">
|
||||||
<a rel="noopener noreferrer" target="_blank" href="https://www.dhs.gov/accessibility" class="usa-identifier__required-link usa-link usa-link--external"
|
<a rel="noopener noreferrer" target="_blank" href="https://www.dhs.gov/accessibility" class="usa-identifier__required-link usa-link usa-link--external"
|
||||||
>Accessibility</a
|
>Accessibility statement</a
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
<li class="usa-identifier__required-links-item">
|
<li class="usa-identifier__required-links-item">
|
||||||
|
|
|
@ -2232,6 +2232,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
"alternative_domains",
|
"alternative_domains",
|
||||||
"generic_org_type",
|
"generic_org_type",
|
||||||
"is_election_board",
|
"is_election_board",
|
||||||
|
"federal_agency",
|
||||||
"id",
|
"id",
|
||||||
"created_at",
|
"created_at",
|
||||||
"updated_at",
|
"updated_at",
|
||||||
|
@ -2286,6 +2287,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
"alternative_domains",
|
"alternative_domains",
|
||||||
"generic_org_type",
|
"generic_org_type",
|
||||||
"is_election_board",
|
"is_election_board",
|
||||||
|
"federal_agency",
|
||||||
"creator",
|
"creator",
|
||||||
"about_your_organization",
|
"about_your_organization",
|
||||||
"requested_domain",
|
"requested_domain",
|
||||||
|
@ -2314,6 +2316,7 @@ class TestDomainRequestAdmin(MockEppLib):
|
||||||
"alternative_domains",
|
"alternative_domains",
|
||||||
"generic_org_type",
|
"generic_org_type",
|
||||||
"is_election_board",
|
"is_election_board",
|
||||||
|
"federal_agency",
|
||||||
]
|
]
|
||||||
|
|
||||||
self.assertEqual(readonly_fields, expected_fields)
|
self.assertEqual(readonly_fields, expected_fields)
|
||||||
|
@ -3172,6 +3175,7 @@ class TestDomainInformationAdmin(TestCase):
|
||||||
"other_contacts",
|
"other_contacts",
|
||||||
"generic_org_type",
|
"generic_org_type",
|
||||||
"is_election_board",
|
"is_election_board",
|
||||||
|
"federal_agency",
|
||||||
"creator",
|
"creator",
|
||||||
"type_of_work",
|
"type_of_work",
|
||||||
"more_organization_information",
|
"more_organization_information",
|
||||||
|
@ -3534,7 +3538,7 @@ class TestMyUserAdmin(TestCase):
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
("Personal Info", {"fields": ("first_name", "last_name", "email")}),
|
("Personal Info", {"fields": ("first_name", "middle_name", "last_name", "email", "title")}),
|
||||||
("Permissions", {"fields": ("is_active", "groups")}),
|
("Permissions", {"fields": ("is_active", "groups")}),
|
||||||
("Important dates", {"fields": ("last_login", "date_joined")}),
|
("Important dates", {"fields": ("last_login", "date_joined")}),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue