mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 03:06:01 +02:00
Merge branch 'main' into dk/1016-nameservers-ui
This commit is contained in:
commit
0e95ff6478
32 changed files with 738 additions and 145 deletions
|
@ -1416,18 +1416,16 @@ class Domain(TimeStampedModel, DomainHelper):
|
|||
"""creates a disclose object that can be added to a contact Create using
|
||||
.disclose= <this function> on the command before sending.
|
||||
if item is security email then make sure email is visable"""
|
||||
isSecurity = contact.contact_type == contact.ContactTypeChoices.SECURITY
|
||||
is_security = contact.contact_type == contact.ContactTypeChoices.SECURITY
|
||||
DF = epp.DiscloseField
|
||||
fields = {DF.FAX, DF.VOICE, DF.ADDR}
|
||||
|
||||
if not isSecurity or (
|
||||
isSecurity and contact.email == PublicContact.get_default_security().email
|
||||
):
|
||||
fields.add(DF.EMAIL)
|
||||
fields = {DF.EMAIL}
|
||||
disclose = (
|
||||
is_security and contact.email != PublicContact.get_default_security().email
|
||||
)
|
||||
# Will only disclose DF.EMAIL if its not the default
|
||||
return epp.Disclose(
|
||||
flag=False,
|
||||
flag=disclose,
|
||||
fields=fields,
|
||||
types={DF.ADDR: "loc"},
|
||||
)
|
||||
|
||||
def _make_epp_contact_postal_info(self, contact: PublicContact): # type: ignore
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue