mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +02:00
Remove abuse contact requirement
The requirement will instead be enforced on registrar contact that is visible in WHOIS as abuse contact. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=154102111
This commit is contained in:
parent
b6e50f0467
commit
33fabfff04
2 changed files with 1 additions and 26 deletions
|
@ -269,8 +269,7 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||||
throw new ContactRequirementException(t);
|
throw new ContactRequirementException(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ensurePhoneNumberNotRemovedForContactTypes(
|
ensurePhoneNumberNotRemovedForContactTypes(oldContactsByType, newContactsByType, Type.TECH);
|
||||||
oldContactsByType, newContactsByType, Type.ABUSE, Type.TECH);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -128,28 +128,4 @@ public class ContactSettingsTest extends RegistrarSettingsActionTestCase {
|
||||||
assertThat(response).containsEntry("message", "Please provide a phone number for at least one "
|
assertThat(response).containsEntry("message", "Please provide a phone number for at least one "
|
||||||
+ RegistrarContact.Type.TECH.getDisplayName() + " contact");
|
+ RegistrarContact.Type.TECH.getDisplayName() + " contact");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testPost_updateContacts_requireAbusePhone_error() throws Exception {
|
|
||||||
// First make the contact a abuse contact as well.
|
|
||||||
Registrar registrar = Registrar.loadByClientId(CLIENT_ID);
|
|
||||||
RegistrarContact rc = AppEngineRule.makeRegistrarContact2()
|
|
||||||
.asBuilder()
|
|
||||||
.setTypes(ImmutableSet.of(RegistrarContact.Type.ADMIN, RegistrarContact.Type.ABUSE))
|
|
||||||
.build();
|
|
||||||
// Lest we anger the timestamp inversion bug.
|
|
||||||
persistResource(registrar);
|
|
||||||
persistSimpleResource(rc);
|
|
||||||
|
|
||||||
// Now try to remove the phone number.
|
|
||||||
rc = rc.asBuilder().setPhoneNumber(null).build();
|
|
||||||
Map<String, Object> reqJson = registrar.toJsonMap();
|
|
||||||
reqJson.put("contacts", ImmutableList.of(rc.toJsonMap()));
|
|
||||||
Map<String, Object> response = action.handleJsonRequest(ImmutableMap.of(
|
|
||||||
"op", "update",
|
|
||||||
"args", reqJson));
|
|
||||||
assertThat(response).containsEntry("status", "ERROR");
|
|
||||||
assertThat(response).containsEntry("message", "Please provide a phone number for at least one "
|
|
||||||
+ RegistrarContact.Type.ABUSE.getDisplayName() + " contact");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue