Readd default email check for email disclose

This commit is contained in:
Erin 2024-01-10 10:38:17 -08:00
parent 683a2f4629
commit 0a13ff9976
No known key found for this signature in database
GPG key ID: 1CAD275313C62460
2 changed files with 14 additions and 12 deletions

View file

@ -1400,7 +1400,7 @@ class Domain(TimeStampedModel, DomainHelper):
is_security = contact.contact_type == contact.ContactTypeChoices.SECURITY
DF = epp.DiscloseField
fields = {DF.EMAIL}
disclose = is_security
disclose = is_security and contact.email != PublicContact.get_default_security().email
# Delete after testing
logger.info("Updated domain contact to disclose: %s", disclose)
# Will only disclose DF.EMAIL if its not the default