mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-05 09:21:54 +02:00
Merge branch 'main' into dk/903-delete-other-contacts
This commit is contained in:
commit
50c59a316d
15 changed files with 157 additions and 89 deletions
|
@ -401,6 +401,8 @@ class HostIPInline(admin.StackedInline):
|
|||
class MyHostAdmin(AuditedAdmin):
|
||||
"""Custom host admin class to use our inlines."""
|
||||
|
||||
search_fields = ["name", "domain__name"]
|
||||
search_help_text = "Search by domain or hostname."
|
||||
inlines = [HostIPInline]
|
||||
|
||||
|
||||
|
@ -1252,7 +1254,7 @@ admin.site.register(models.Domain, DomainAdmin)
|
|||
admin.site.register(models.DraftDomain, DraftDomainAdmin)
|
||||
# Host and HostIP removed from django admin because changes in admin
|
||||
# do not propagate to registry and logic not applied
|
||||
# admin.site.register(models.Host, MyHostAdmin)
|
||||
admin.site.register(models.Host, MyHostAdmin)
|
||||
admin.site.register(models.Website, WebsiteAdmin)
|
||||
admin.site.register(models.PublicContact, AuditedAdmin)
|
||||
admin.site.register(models.DomainApplication, DomainApplicationAdmin)
|
||||
|
|
|
@ -96,7 +96,7 @@ class RegistrarFormSet(forms.BaseFormSet):
|
|||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def test_if_more_than_one_join(self, db_obj, rel, related_name):
|
||||
def has_more_than_one_join(self, db_obj, rel, related_name):
|
||||
"""Helper for finding whether an object is joined more than once."""
|
||||
# threshold is the number of related objects that are acceptable
|
||||
# when determining if related objects exist. threshold is 0 for most
|
||||
|
@ -165,13 +165,12 @@ class RegistrarFormSet(forms.BaseFormSet):
|
|||
# matching database object exists, update it
|
||||
if db_obj is not None and cleaned:
|
||||
if should_delete(cleaned):
|
||||
if any(self.test_if_more_than_one_join(db_obj, rel, related_name) for rel in reverse_joins):
|
||||
if any(self.has_more_than_one_join(db_obj, rel, related_name) for rel in reverse_joins):
|
||||
# Remove the specific relationship without deleting the object
|
||||
getattr(db_obj, related_name).remove(self.application)
|
||||
else:
|
||||
# If there are no other relationships, delete the object
|
||||
db_obj.delete()
|
||||
continue
|
||||
else:
|
||||
pre_update(db_obj, cleaned)
|
||||
db_obj.save()
|
||||
|
|
17
src/registrar/migrations/0062_alter_host_name.py
Normal file
17
src/registrar/migrations/0062_alter_host_name.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Generated by Django 4.2.7 on 2024-01-09 02:32
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
dependencies = [
|
||||
("registrar", "0061_domain_security_contact_registry_id"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name="host",
|
||||
name="name",
|
||||
field=models.CharField(default=None, help_text="Fully qualified domain name", max_length=253),
|
||||
),
|
||||
]
|
|
@ -20,7 +20,7 @@ class Host(TimeStampedModel):
|
|||
null=False,
|
||||
blank=False,
|
||||
default=None, # prevent saving without a value
|
||||
unique=True,
|
||||
unique=False,
|
||||
help_text="Fully qualified domain name",
|
||||
)
|
||||
|
||||
|
@ -30,3 +30,6 @@ class Host(TimeStampedModel):
|
|||
related_name="host", # access this Host via the Domain as `domain.host`
|
||||
help_text="Domain to which this host belongs",
|
||||
)
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.domain.name} {self.name}"
|
||||
|
|
|
@ -3,30 +3,38 @@ Hi.
|
|||
|
||||
{{ requester_email }} has added you as a manager on {{ domain.name }}.
|
||||
|
||||
You can manage this domain on the .gov registrar <https://manage.get.gov>.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
YOU NEED A LOGIN.GOV ACCOUNT
|
||||
You’ll need a Login.gov account to manage your .gov domain. Login.gov provides
|
||||
a simple and secure process for signing into many government services with one
|
||||
account. If you don’t already have one, follow these steps to create your
|
||||
a simple and secure process for signing in to many government services with one
|
||||
account.
|
||||
|
||||
If you don’t already have one, follow these steps to create your
|
||||
Login.gov account <https://login.gov/help/get-started/create-your-account/>.
|
||||
|
||||
|
||||
DOMAIN MANAGEMENT
|
||||
As a .gov domain manager you can add or update information about your domain.
|
||||
As a .gov domain manager, you can add or update information about your domain.
|
||||
You’ll also serve as a contact for your .gov domain. Please keep your contact
|
||||
information updated. Learn more about domain management <https://get.gov/help/>.
|
||||
information updated.
|
||||
|
||||
Learn more about domain management <https://get.gov/help/domain-management>.
|
||||
|
||||
|
||||
SOMETHING WRONG?
|
||||
If you’re not affiliated with {{ domain.name }} or think you received this
|
||||
message in error, contact the .gov team <https://get.gov/help/#contact-us>.
|
||||
message in error, reply to this email.
|
||||
|
||||
|
||||
THANK YOU
|
||||
|
||||
.Gov helps the public identify official, trusted information. Thank you for
|
||||
using a .gov domain.
|
||||
.Gov helps the public identify official, trusted information. Thank you for using a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
The .gov team
|
||||
Contact us: <https://get.gov/contact/>
|
||||
Visit <https://get.gov>
|
||||
{% endautoescape %}
|
||||
Learn about .gov <https://get.gov>
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1,26 +1,28 @@
|
|||
{% autoescape off %}{# In a text file, we don't want to have HTML entities escaped #}
|
||||
Hi {{ application.submitter.first_name }}.
|
||||
Hi, {{ application.submitter.first_name }}.
|
||||
|
||||
Your .gov domain request has been withdrawn and will not be reviewed by our team.
|
||||
|
||||
Your .gov domain request has been withdrawn.
|
||||
DOMAIN REQUESTED: {{ application.requested_domain.name }}
|
||||
REQUEST #: {{ application.id }}
|
||||
REQUEST RECEIVED ON: {{ application.submission_date|date }}
|
||||
STATUS: Withdrawn
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
YOU CAN EDIT YOUR WITHDRAWN REQUEST
|
||||
You can edit and resubmit this request by signing in to the registrar <https://manage.get.gov/>.
|
||||
|
||||
|
||||
SOMETHING WRONG?
|
||||
If you didn’t ask for this domain request to be withdrawn or think you received this message in error, reply to this email.
|
||||
|
||||
The details of your withdrawn request are included below. You can edit and resubmit this application by logging into the registrar. <https://manage.get.gov/>.
|
||||
|
||||
THANK YOU
|
||||
|
||||
.Gov helps the public identify official, trusted information. Thank you for requesting a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
{% include 'emails/includes/application_summary.txt' %}
|
||||
----------------------------------------------------------------
|
||||
|
||||
The .gov team
|
||||
Contact us: <https://get.gov/contact/>
|
||||
Visit <https://get.gov>
|
||||
{% endautoescape %}
|
||||
Learn about .gov <https://get.gov>
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Your .gov domain request has been withdrawn
|
||||
Update on your .gov request: {{ application.requested_domain.name }}
|
||||
|
|
|
@ -1,40 +1,43 @@
|
|||
{% autoescape off %}{# In a text file, we don't want to have HTML entities escaped #}
|
||||
Hi {{ application.submitter.first_name }}.
|
||||
Hi, {{ application.submitter.first_name }}.
|
||||
|
||||
Congratulations! Your .gov domain request has been approved.
|
||||
|
||||
DOMAIN REQUESTED: {{ application.requested_domain.name }}
|
||||
REQUEST RECEIVED ON: {{ application.submission_date|date }}
|
||||
REQUEST #: {{ application.id }}
|
||||
STATUS: In review
|
||||
STATUS: Approved
|
||||
|
||||
Now that your .gov domain has been approved, there are a few more things to do before your domain can be used.
|
||||
You can manage your approved domain on the .gov registrar <https://manage.get.gov>.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
YOU MUST ADD DOMAIN NAME SERVER INFORMATION
|
||||
ADD DOMAIN NAME SERVER INFORMATION
|
||||
Before your .gov domain can be used, you’ll first need to connect it to a Domain Name System (DNS) hosting service. At this time, we don’t provide DNS hosting services.
|
||||
|
||||
Before your .gov domain can be used, you have to connect it to your Domain Name System (DNS) hosting service. At this time, we don’t provide DNS hosting services.
|
||||
Go to the domain management page to add your domain name server information <https://manage.get.gov/domain/{{ application.approved_domain.id }}/nameservers>.
|
||||
After you’ve set up hosting, you’ll need to enter your name server information on the .gov registrar.
|
||||
|
||||
Get help with adding your domain name server information <https://get.gov/help/domain-management/#manage-dns-information-for-your-domain>.
|
||||
Learn more about:
|
||||
- Finding a DNS hosting service <https://get.gov/domains/moving/#find-dns-hosting-services>
|
||||
- Adding name servers <https://get.gov/help/domain-management/#manage-dns-name-servers>.
|
||||
|
||||
|
||||
ADD DOMAIN MANAGERS, SECURITY EMAIL
|
||||
Currently, you’re the only person who can manage this domain. Please keep your contact information updated.
|
||||
|
||||
We strongly recommend that you add other points of contact who will help manage your domain. We also recommend that you provide a security email. This email will allow the public to report security issues on your domain. Security emails are made public.
|
||||
We strongly recommend adding other domain managers who can serve as additional contacts. We also recommend providing a security email that the public can use to report security issues on your domain. You can add domain managers and a security email on the .gov registrar.
|
||||
|
||||
Go to the domain management page to add domain contacts <https://manage.get.gov/domain/{{ application.approved_domain.id }}/your-contact-information> and a security email <https://manage.get.gov/domain/{{ application.approved_domain.id }}/security-email>.
|
||||
|
||||
Get help with managing your .gov domain <https://get.gov/help/domain-management/>.
|
||||
Learn more about:
|
||||
- Adding domain managers <https://get.gov/help/domain-management/#add-a-domain-manager-to-your-.gov-domain>
|
||||
- Adding a security email <https://get.gov/help/domain-management/#add-or-update-the-security-email-for-your-.gov-domain>
|
||||
- Domain security best practices <https://get.gov/domains/security/>
|
||||
|
||||
|
||||
THANK YOU
|
||||
|
||||
.Gov helps the public identify official, trusted information. Thank you for using a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
The .gov team
|
||||
Contact us: <https://get.gov/contact/>
|
||||
Visit <https://get.gov>
|
||||
Learn about .gov <https://get.gov>
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Your .gov domain request is approved
|
||||
Update on your .gov request: {{ application.requested_domain.name }}
|
||||
|
|
|
@ -1,32 +1,32 @@
|
|||
{% autoescape off %}{# In a text file, we don't want to have HTML entities escaped #}
|
||||
Hi {{ application.submitter.first_name }}.
|
||||
Hi, {{ application.submitter.first_name }}.
|
||||
|
||||
Your .gov domain request has been rejected.
|
||||
|
||||
DOMAIN REQUESTED: {{ application.requested_domain.name }}
|
||||
REQUEST RECEIVED ON: {{ application.submission_date|date }}
|
||||
REQUEST #: {{ application.id }}
|
||||
STATUS: Rejected
|
||||
|
||||
|
||||
YOU CAN SUBMIT A NEW REQUEST
|
||||
|
||||
The details of your request are included below. If your organization is eligible for a .gov
|
||||
domain and you meet our other requirements, you can submit a new request. Learn
|
||||
more about .gov domains <https://get.gov/help/domains/>.
|
||||
|
||||
|
||||
THANK YOU
|
||||
|
||||
.Gov helps the public identify official, trusted information. Thank you for
|
||||
requesting a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
{% include 'emails/includes/application_summary.txt' %}
|
||||
YOU CAN SUBMIT A NEW REQUEST
|
||||
If your organization is eligible for a .gov domain and you meet our other requirements, you can submit a new request.
|
||||
|
||||
Learn more about:
|
||||
- Eligibility for a .gov domain <https://get.gov/domains/eligibility>
|
||||
- Choosing a .gov domain name <https://get.gov/domains/choosing>
|
||||
|
||||
|
||||
NEED ASSISTANCE?
|
||||
If you have questions about this domain request or need help choosing a new domain name, reply to this email.
|
||||
|
||||
|
||||
THANK YOU
|
||||
.Gov helps the public identify official, trusted information. Thank you for requesting a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
The .gov team
|
||||
Contact us: <https://get.gov/contact/>
|
||||
Visit <https://get.gov>
|
||||
Learn about .gov <https://get.gov>
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Your .gov domain request has been rejected
|
||||
Update on your .gov request: {{ application.requested_domain.name }}
|
||||
|
|
|
@ -1,35 +1,31 @@
|
|||
{% autoescape off %}{# In a text file, we don't want to have HTML entities escaped #}
|
||||
Hi {{ application.submitter.first_name }}.
|
||||
Hi, {{ application.submitter.first_name }}.
|
||||
|
||||
We received your .gov domain request.
|
||||
|
||||
DOMAIN REQUESTED: {{ application.requested_domain.name }}
|
||||
REQUEST RECEIVED ON: {{ application.submission_date|date }}
|
||||
REQUEST #: {{ application.id }}
|
||||
STATUS: Received
|
||||
STATUS: Submitted
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
NEXT STEPS
|
||||
We’ll review your request. This usually takes 20 business days. During this review we’ll verify that:
|
||||
- Your organization is eligible for a .gov domain
|
||||
- You work at the organization and/or can make requests on its behalf
|
||||
- Your requested domain meets our naming requirements
|
||||
|
||||
We’ll email you if we have questions and when we complete our review. You can check the status of your request at any time on the registrar homepage. <https://manage.get.gov>
|
||||
|
||||
|
||||
NEED TO MAKE CHANGES?
|
||||
To make changes to your domain request, you have to withdraw it first. Withdrawing your request may extend the time it takes for the .gov team to complete their review.
|
||||
|
||||
If you need to change your request you have to first withdraw it. Once you
|
||||
withdraw the request you can edit it and submit it again. Changing your request
|
||||
might add to the wait time. Learn more about withdrawing your request.
|
||||
|
||||
|
||||
NEXT STEPS
|
||||
|
||||
- We’ll review your request. This usually takes 20 business days.
|
||||
|
||||
- You can check the status of your request at any time.
|
||||
<https://manage.get.gov/application/{{ application.id }}>
|
||||
|
||||
- We’ll email you with questions or when we complete our review.
|
||||
Learn more about withdrawing your request <https://get.gov/help/domain-requests/#withdraw-your-domain-request>.
|
||||
|
||||
|
||||
THANK YOU
|
||||
|
||||
.Gov helps the public identify official, trusted information. Thank you for
|
||||
requesting a .gov domain.
|
||||
.Gov helps the public identify official, trusted information. Thank you for requesting a .gov domain.
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
@ -38,5 +34,5 @@ requesting a .gov domain.
|
|||
|
||||
The .gov team
|
||||
Contact us: <https://get.gov/contact/>
|
||||
Visit <https://get.gov>
|
||||
Learn about .gov <https://get.gov>
|
||||
{% endautoescape %}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Thank you for applying for a .gov domain
|
||||
Update on your .gov request: {{ application.requested_domain.name }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue