mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Redirect Registrar.referralUrl UI actions to url field
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=196597051
This commit is contained in:
parent
de5645abd9
commit
6cdbde107f
23 changed files with 18 additions and 59 deletions
|
@ -1381,13 +1381,6 @@ public final class RegistryConfig {
|
||||||
return CONFIG_SETTINGS.get().registryPolicy.defaultRegistrarWhoisServer;
|
return CONFIG_SETTINGS.get().registryPolicy.defaultRegistrarWhoisServer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the default referral URL that is used unless registrars have specified otherwise.
|
|
||||||
*/
|
|
||||||
public static String getDefaultRegistrarReferralUrl() {
|
|
||||||
return CONFIG_SETTINGS.get().registryPolicy.defaultRegistrarReferralUrl;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of {@code EppResourceIndex} buckets to be used.
|
* Returns the number of {@code EppResourceIndex} buckets to be used.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -58,9 +58,6 @@ registryPolicy:
|
||||||
# Default WHOIS server used when not specified on a registrar.
|
# Default WHOIS server used when not specified on a registrar.
|
||||||
defaultRegistrarWhoisServer: whois.domain-registry.example
|
defaultRegistrarWhoisServer: whois.domain-registry.example
|
||||||
|
|
||||||
# Default referral URL used when not changed by a registrar.
|
|
||||||
defaultRegistrarReferralUrl: https://www.domain-registry.example
|
|
||||||
|
|
||||||
# Mode TMCH should run in (PRODUCTION for production environments, PILOT for
|
# Mode TMCH should run in (PRODUCTION for production environments, PILOT for
|
||||||
# all others including sandbox).
|
# all others including sandbox).
|
||||||
tmchCaMode: PILOT
|
tmchCaMode: PILOT
|
||||||
|
|
|
@ -24,7 +24,6 @@ registryPolicy:
|
||||||
- placeholder
|
- placeholder
|
||||||
- placeholder
|
- placeholder
|
||||||
defaultRegistrarWhoisServer: placeholder
|
defaultRegistrarWhoisServer: placeholder
|
||||||
defaultRegistrarReferralUrl: placeholder
|
|
||||||
tmchCaMode: PRODUCTION
|
tmchCaMode: PRODUCTION
|
||||||
tmchCrlUrl: http://crl.icann.org/tmch.crl
|
tmchCrlUrl: http://crl.icann.org/tmch.crl
|
||||||
tmchMarksDbUrl: https://ry.marksdb.org
|
tmchMarksDbUrl: https://ry.marksdb.org
|
||||||
|
|
|
@ -6,7 +6,6 @@ registryPolicy:
|
||||||
- notification@test.example
|
- notification@test.example
|
||||||
- notification2@test.example
|
- notification2@test.example
|
||||||
defaultRegistrarWhoisServer: whois.nic.fakewhois.example
|
defaultRegistrarWhoisServer: whois.nic.fakewhois.example
|
||||||
defaultRegistrarReferralUrl: http://www.referral.example/path
|
|
||||||
|
|
||||||
datastore:
|
datastore:
|
||||||
commitLogBucketsNum: 3
|
commitLogBucketsNum: 3
|
||||||
|
|
|
@ -147,7 +147,7 @@ class SyncRegistrarsSheet {
|
||||||
builder.put("blockPremiumNames", convert(registrar.getBlockPremiumNames()));
|
builder.put("blockPremiumNames", convert(registrar.getBlockPremiumNames()));
|
||||||
builder.put("ipAddressWhitelist", convert(registrar.getIpAddressWhitelist()));
|
builder.put("ipAddressWhitelist", convert(registrar.getIpAddressWhitelist()));
|
||||||
builder.put("url", convert(registrar.getUrl()));
|
builder.put("url", convert(registrar.getUrl()));
|
||||||
builder.put("referralUrl", convert(registrar.getReferralUrl()));
|
builder.put("referralUrl", convert(registrar.getUrl()));
|
||||||
builder.put("icannReferralEmail", convert(registrar.getIcannReferralEmail()));
|
builder.put("icannReferralEmail", convert(registrar.getIcannReferralEmail()));
|
||||||
return builder.build();
|
return builder.build();
|
||||||
})
|
})
|
||||||
|
|
|
@ -24,7 +24,6 @@ import static com.google.common.collect.ImmutableSortedSet.toImmutableSortedSet;
|
||||||
import static com.google.common.collect.Ordering.natural;
|
import static com.google.common.collect.Ordering.natural;
|
||||||
import static com.google.common.collect.Sets.immutableEnumSet;
|
import static com.google.common.collect.Sets.immutableEnumSet;
|
||||||
import static com.google.common.io.BaseEncoding.base64;
|
import static com.google.common.io.BaseEncoding.base64;
|
||||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarReferralUrl;
|
|
||||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
||||||
import static google.registry.model.CacheUtils.memoizeWithShortExpiration;
|
import static google.registry.model.CacheUtils.memoizeWithShortExpiration;
|
||||||
import static google.registry.model.common.EntityGroupRoot.getCrossTldKey;
|
import static google.registry.model.common.EntityGroupRoot.getCrossTldKey;
|
||||||
|
@ -364,9 +363,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||||
/** URL of registrar's website. */
|
/** URL of registrar's website. */
|
||||||
String url;
|
String url;
|
||||||
|
|
||||||
/** Referral URL of registrar. */
|
|
||||||
String referralUrl;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ICANN referral email address.
|
* ICANN referral email address.
|
||||||
*
|
*
|
||||||
|
@ -551,10 +547,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getReferralUrl() {
|
|
||||||
return firstNonNull(referralUrl, getDefaultRegistrarReferralUrl());
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getIcannReferralEmail() {
|
public String getIcannReferralEmail() {
|
||||||
return nullToEmpty(icannReferralEmail);
|
return nullToEmpty(icannReferralEmail);
|
||||||
}
|
}
|
||||||
|
@ -617,7 +609,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||||
.put("blockPremiumNames", blockPremiumNames)
|
.put("blockPremiumNames", blockPremiumNames)
|
||||||
.put("premiumPriceAckRequired", premiumPriceAckRequired)
|
.put("premiumPriceAckRequired", premiumPriceAckRequired)
|
||||||
.put("url", url)
|
.put("url", url)
|
||||||
.put("referralUrl", getReferralUrl())
|
|
||||||
.put("icannReferralEmail", getIcannReferralEmail())
|
.put("icannReferralEmail", getIcannReferralEmail())
|
||||||
.put("driveFolderId", driveFolderId)
|
.put("driveFolderId", driveFolderId)
|
||||||
.put("phoneNumber", phoneNumber)
|
.put("phoneNumber", phoneNumber)
|
||||||
|
@ -833,11 +824,6 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Builder setReferralUrl(String referralUrl) {
|
|
||||||
getInstance().referralUrl = referralUrl;
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Builder setIcannReferralEmail(String icannReferralEmail) {
|
public Builder setIcannReferralEmail(String icannReferralEmail) {
|
||||||
getInstance().icannReferralEmail = icannReferralEmail;
|
getInstance().icannReferralEmail = icannReferralEmail;
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -154,10 +154,6 @@ public final class RegistrarFormFields {
|
||||||
FormFields.MIN_TOKEN.asBuilderNamed("url")
|
FormFields.MIN_TOKEN.asBuilderNamed("url")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
public static final FormField<String, String> REFERRAL_URL_FIELD =
|
|
||||||
FormFields.MIN_TOKEN.asBuilderNamed("referralUrl")
|
|
||||||
.build();
|
|
||||||
|
|
||||||
public static final FormField<List<String>, List<CidrAddressBlock>> IP_ADDRESS_WHITELIST_FIELD =
|
public static final FormField<List<String>, List<CidrAddressBlock>> IP_ADDRESS_WHITELIST_FIELD =
|
||||||
FormField.named("ipAddressWhitelist")
|
FormField.named("ipAddressWhitelist")
|
||||||
.emptyToNull()
|
.emptyToNull()
|
||||||
|
|
|
@ -224,8 +224,7 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||||
// WHOIS
|
// WHOIS
|
||||||
builder.setWhoisServer(
|
builder.setWhoisServer(
|
||||||
RegistrarFormFields.WHOIS_SERVER_FIELD.extractUntyped(args).orElse(null));
|
RegistrarFormFields.WHOIS_SERVER_FIELD.extractUntyped(args).orElse(null));
|
||||||
builder.setReferralUrl(
|
builder.setUrl(RegistrarFormFields.URL_FIELD.extractUntyped(args).orElse(null));
|
||||||
RegistrarFormFields.REFERRAL_URL_FIELD.extractUntyped(args).orElse(null));
|
|
||||||
|
|
||||||
// If the email is already null / empty - we can keep it so. But if it's set - it's required to
|
// If the email is already null / empty - we can keep it so. But if it's set - it's required to
|
||||||
// remain set.
|
// remain set.
|
||||||
|
@ -241,8 +240,6 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
||||||
builder.setLocalizedAddress(
|
builder.setLocalizedAddress(
|
||||||
RegistrarFormFields.L10N_ADDRESS_FIELD.extractUntyped(args).orElse(null));
|
RegistrarFormFields.L10N_ADDRESS_FIELD.extractUntyped(args).orElse(null));
|
||||||
|
|
||||||
builder.setUrl(RegistrarFormFields.URL_FIELD.extractUntyped(args).orElse(null));
|
|
||||||
|
|
||||||
// Security
|
// Security
|
||||||
builder.setIpAddressWhitelist(
|
builder.setIpAddressWhitelist(
|
||||||
RegistrarFormFields.IP_ADDRESS_WHITELIST_FIELD
|
RegistrarFormFields.IP_ADDRESS_WHITELIST_FIELD
|
||||||
|
|
|
@ -23,14 +23,14 @@
|
||||||
{@param icannReferralEmail: string}
|
{@param icannReferralEmail: string}
|
||||||
{@param readonly: bool}
|
{@param readonly: bool}
|
||||||
{@param? whoisServer: string}
|
{@param? whoisServer: string}
|
||||||
{@param? referralUrl: string}
|
{@param? url: string}
|
||||||
// Passed to .contactInfo_
|
// Passed to .contactInfo_
|
||||||
{@param? emailAddress: string}
|
{@param? emailAddress: string}
|
||||||
{@param? localizedAddress: ?}
|
{@param? localizedAddress: ?}
|
||||||
{@param? phoneNumber: string}
|
{@param? phoneNumber: string}
|
||||||
{@param? faxNumber: string}
|
{@param? faxNumber: string}
|
||||||
{let $whoisServerNonNull: $whoisServer ?: 'None' /}
|
{let $whoisServerNonNull: $whoisServer ?: 'None' /}
|
||||||
{let $referralUrlNonNull: $referralUrl ?: 'None' /}
|
{let $urlNonNull: $url ?: 'None' /}
|
||||||
<form name="item" class="{css('item')} {css('registrar')} {css('kd-settings-pane')}">
|
<form name="item" class="{css('item')} {css('registrar')} {css('kd-settings-pane')}">
|
||||||
<h1>WHOIS Settings</h1>
|
<h1>WHOIS Settings</h1>
|
||||||
{if $readonly}
|
{if $readonly}
|
||||||
|
@ -66,8 +66,8 @@
|
||||||
{/call}
|
{/call}
|
||||||
{call registry.soy.forms.inputFieldRowWithValue}
|
{call registry.soy.forms.inputFieldRowWithValue}
|
||||||
{param label: 'Referral URL' /}
|
{param label: 'Referral URL' /}
|
||||||
{param name: 'referralUrl' /}
|
{param name: 'url' /}
|
||||||
{param value: $referralUrlNonNull /}
|
{param value: $urlNonNull /}
|
||||||
{param readonly: $readonly /}
|
{param readonly: $readonly /}
|
||||||
{/call}
|
{/call}
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -16,7 +16,6 @@ package google.registry.export.sheet;
|
||||||
|
|
||||||
import static com.google.common.collect.Iterables.getOnlyElement;
|
import static com.google.common.collect.Iterables.getOnlyElement;
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarReferralUrl;
|
|
||||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
||||||
import static google.registry.model.common.Cursor.CursorType.SYNC_REGISTRAR_SHEET;
|
import static google.registry.model.common.Cursor.CursorType.SYNC_REGISTRAR_SHEET;
|
||||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||||
|
@ -278,7 +277,7 @@ public class SyncRegistrarsSheetTest {
|
||||||
assertThat(row).containsEntry("url", "http://www.example.org/aaa_registrar");
|
assertThat(row).containsEntry("url", "http://www.example.org/aaa_registrar");
|
||||||
assertThat(row).containsEntry("icannReferralEmail", "");
|
assertThat(row).containsEntry("icannReferralEmail", "");
|
||||||
assertThat(row).containsEntry("whoisServer", getDefaultRegistrarWhoisServer());
|
assertThat(row).containsEntry("whoisServer", getDefaultRegistrarWhoisServer());
|
||||||
assertThat(row).containsEntry("referralUrl", getDefaultRegistrarReferralUrl());
|
assertThat(row).containsEntry("referralUrl", "http://www.example.org/aaa_registrar");
|
||||||
assertThat(row).containsEntry("billingAccountMap", "{JPY=JPY7890, USD=USD1234}");
|
assertThat(row).containsEntry("billingAccountMap", "{JPY=JPY7890, USD=USD1234}");
|
||||||
|
|
||||||
row = rows.get(1);
|
row = rows.get(1);
|
||||||
|
@ -311,7 +310,7 @@ public class SyncRegistrarsSheetTest {
|
||||||
assertThat(row).containsEntry("blockPremiumNames", "false");
|
assertThat(row).containsEntry("blockPremiumNames", "false");
|
||||||
assertThat(row).containsEntry("ipAddressWhitelist", "");
|
assertThat(row).containsEntry("ipAddressWhitelist", "");
|
||||||
assertThat(row).containsEntry("url", "http://www.example.org/another_registrar");
|
assertThat(row).containsEntry("url", "http://www.example.org/another_registrar");
|
||||||
assertThat(row).containsEntry("referralUrl", getDefaultRegistrarReferralUrl());
|
assertThat(row).containsEntry("referralUrl", "http://www.example.org/another_registrar");
|
||||||
assertThat(row).containsEntry("icannReferralEmail", "jim@example.net");
|
assertThat(row).containsEntry("icannReferralEmail", "jim@example.net");
|
||||||
assertThat(row).containsEntry("billingAccountMap", "{}");
|
assertThat(row).containsEntry("billingAccountMap", "{}");
|
||||||
|
|
||||||
|
@ -355,7 +354,7 @@ public class SyncRegistrarsSheetTest {
|
||||||
assertThat(row).containsEntry("blockPremiumNames", "false");
|
assertThat(row).containsEntry("blockPremiumNames", "false");
|
||||||
assertThat(row).containsEntry("ipAddressWhitelist", "");
|
assertThat(row).containsEntry("ipAddressWhitelist", "");
|
||||||
assertThat(row).containsEntry("url", "");
|
assertThat(row).containsEntry("url", "");
|
||||||
assertThat(row).containsEntry("referralUrl", getDefaultRegistrarReferralUrl());
|
assertThat(row).containsEntry("referralUrl", "");
|
||||||
assertThat(row).containsEntry("icannReferralEmail", "");
|
assertThat(row).containsEntry("icannReferralEmail", "");
|
||||||
assertThat(row).containsEntry("billingAccountMap", "{}");
|
assertThat(row).containsEntry("billingAccountMap", "{}");
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,6 @@ public class RegistrarTest extends EntityTestCase {
|
||||||
.setFaxNumber("+1.2125551213")
|
.setFaxNumber("+1.2125551213")
|
||||||
.setEmailAddress("contact-us@example.com")
|
.setEmailAddress("contact-us@example.com")
|
||||||
.setUrl("http://www.example.com")
|
.setUrl("http://www.example.com")
|
||||||
.setReferralUrl("http://www.example.com")
|
|
||||||
.setIcannReferralEmail("foo@example.com")
|
.setIcannReferralEmail("foo@example.com")
|
||||||
.setDriveFolderId("drive folder id")
|
.setDriveFolderId("drive folder id")
|
||||||
.setIanaIdentifier(8L)
|
.setIanaIdentifier(8L)
|
||||||
|
|
|
@ -608,7 +608,6 @@ class google.registry.model.registrar.Registrar {
|
||||||
java.lang.String passwordHash;
|
java.lang.String passwordHash;
|
||||||
java.lang.String phoneNumber;
|
java.lang.String phoneNumber;
|
||||||
java.lang.String phonePasscode;
|
java.lang.String phonePasscode;
|
||||||
java.lang.String referralUrl;
|
|
||||||
java.lang.String registrarName;
|
java.lang.String registrarName;
|
||||||
java.lang.String salt;
|
java.lang.String salt;
|
||||||
java.lang.String url;
|
java.lang.String url;
|
||||||
|
|
|
@ -70,6 +70,7 @@ public class RdeMarshallerTest extends ShardableTestCase {
|
||||||
+ " </rdeRegistrar:postalInfo>\n"
|
+ " </rdeRegistrar:postalInfo>\n"
|
||||||
+ " <rdeRegistrar:voice>+1.2223334444</rdeRegistrar:voice>\n"
|
+ " <rdeRegistrar:voice>+1.2223334444</rdeRegistrar:voice>\n"
|
||||||
+ " <rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>\n"
|
+ " <rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>\n"
|
||||||
|
+ " <rdeRegistrar:url>http://my.fake.url</rdeRegistrar:url>\n"
|
||||||
+ " <rdeRegistrar:whoisInfo>\n"
|
+ " <rdeRegistrar:whoisInfo>\n"
|
||||||
+ " <rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>\n"
|
+ " <rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>\n"
|
||||||
+ " </rdeRegistrar:whoisInfo>\n"
|
+ " </rdeRegistrar:whoisInfo>\n"
|
||||||
|
|
|
@ -62,6 +62,7 @@
|
||||||
</rdeRegistrar:postalInfo>
|
</rdeRegistrar:postalInfo>
|
||||||
<rdeRegistrar:voice>+1.3334445555</rdeRegistrar:voice>
|
<rdeRegistrar:voice>+1.3334445555</rdeRegistrar:voice>
|
||||||
<rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>
|
<rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>
|
||||||
|
<rdeRegistrar:url>http://my.fake.url</rdeRegistrar:url>
|
||||||
<rdeRegistrar:whoisInfo>
|
<rdeRegistrar:whoisInfo>
|
||||||
<rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>
|
<rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>
|
||||||
</rdeRegistrar:whoisInfo>
|
</rdeRegistrar:whoisInfo>
|
||||||
|
@ -94,6 +95,7 @@
|
||||||
</rdeRegistrar:postalInfo>
|
</rdeRegistrar:postalInfo>
|
||||||
<rdeRegistrar:voice>+1.2223334444</rdeRegistrar:voice>
|
<rdeRegistrar:voice>+1.2223334444</rdeRegistrar:voice>
|
||||||
<rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>
|
<rdeRegistrar:email>new.registrar@example.com</rdeRegistrar:email>
|
||||||
|
<rdeRegistrar:url>http://my.fake.url</rdeRegistrar:url>
|
||||||
<rdeRegistrar:whoisInfo>
|
<rdeRegistrar:whoisInfo>
|
||||||
<rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>
|
<rdeRegistrar:name>whois.nic.fakewhois.example</rdeRegistrar:name>
|
||||||
</rdeRegistrar:whoisInfo>
|
</rdeRegistrar:whoisInfo>
|
||||||
|
|
|
@ -165,6 +165,7 @@ public final class AppEngineRule extends ExternalResource {
|
||||||
.setState(State.ACTIVE)
|
.setState(State.ACTIVE)
|
||||||
.setEmailAddress("new.registrar@example.com")
|
.setEmailAddress("new.registrar@example.com")
|
||||||
.setIcannReferralEmail("lol@sloth.test")
|
.setIcannReferralEmail("lol@sloth.test")
|
||||||
|
.setUrl("http://my.fake.url")
|
||||||
.setInternationalizedAddress(new RegistrarAddress.Builder()
|
.setInternationalizedAddress(new RegistrarAddress.Builder()
|
||||||
.setStreet(ImmutableList.of("123 Example Boulevard"))
|
.setStreet(ImmutableList.of("123 Example Boulevard"))
|
||||||
.setCity("Williamsburg")
|
.setCity("Williamsburg")
|
||||||
|
|
|
@ -80,7 +80,6 @@ public final class FullFieldsTestEntityHelper {
|
||||||
.setFaxNumber("+1.2125551213")
|
.setFaxNumber("+1.2125551213")
|
||||||
.setEmailAddress("contact-us@example.com")
|
.setEmailAddress("contact-us@example.com")
|
||||||
.setWhoisServer("whois.example.com")
|
.setWhoisServer("whois.example.com")
|
||||||
.setReferralUrl("http://www.example.com")
|
|
||||||
.setUrl("http://my.fake.url")
|
.setUrl("http://my.fake.url")
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ function createTestRegistrar() {
|
||||||
ianaIdentifier: 1,
|
ianaIdentifier: 1,
|
||||||
icannReferralEmail: 'lol@sloth.test',
|
icannReferralEmail: 'lol@sloth.test',
|
||||||
whoisServer: 'foo.bar.baz',
|
whoisServer: 'foo.bar.baz',
|
||||||
referralUrl: 'blah.blar',
|
url: 'blah.blar',
|
||||||
phoneNumber: '+1.2125650000',
|
phoneNumber: '+1.2125650000',
|
||||||
faxNumber: '+1.2125650001',
|
faxNumber: '+1.2125650001',
|
||||||
localizedAddress: {
|
localizedAddress: {
|
||||||
|
|
|
@ -214,12 +214,6 @@ public class RegistrarSettingsActionTest extends RegistrarSettingsActionTestCase
|
||||||
doTestUpdate(Registrar::getWhoisServer, "new-whois.example", Registrar.Builder::setWhoisServer);
|
doTestUpdate(Registrar::getWhoisServer, "new-whois.example", Registrar.Builder::setWhoisServer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void testUpdate_referralUrl() throws Exception {
|
|
||||||
doTestUpdate(
|
|
||||||
Registrar::getReferralUrl, "new-reference-url.example", Registrar.Builder::setReferralUrl);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testUpdate_phoneNumber() throws Exception {
|
public void testUpdate_phoneNumber() throws Exception {
|
||||||
doTestUpdate(Registrar::getPhoneNumber, "+1.2345678900", Registrar.Builder::setPhoneNumber);
|
doTestUpdate(Registrar::getPhoneNumber, "+1.2345678900", Registrar.Builder::setPhoneNumber);
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
package google.registry.ui.server.registrar;
|
package google.registry.ui.server.registrar;
|
||||||
|
|
||||||
import static com.google.common.truth.Truth.assertThat;
|
import static com.google.common.truth.Truth.assertThat;
|
||||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarReferralUrl;
|
|
||||||
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
import static google.registry.config.RegistryConfig.getDefaultRegistrarWhoisServer;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
||||||
|
@ -53,12 +52,11 @@ public class SecuritySettingsTest extends RegistrarSettingsActionTestCase {
|
||||||
Map<String, Object> response = action.handleJsonRequest(ImmutableMap.of(
|
Map<String, Object> response = action.handleJsonRequest(ImmutableMap.of(
|
||||||
"op", "update",
|
"op", "update",
|
||||||
"args", modified.toJsonMap()));
|
"args", modified.toJsonMap()));
|
||||||
// Empty whoisServer and referralUrl fields should be set to defaults by server.
|
// Empty whoisServer field should be set to default by server.
|
||||||
modified =
|
modified =
|
||||||
modified
|
modified
|
||||||
.asBuilder()
|
.asBuilder()
|
||||||
.setWhoisServer(getDefaultRegistrarWhoisServer())
|
.setWhoisServer(getDefaultRegistrarWhoisServer())
|
||||||
.setReferralUrl(getDefaultRegistrarReferralUrl())
|
|
||||||
.build();
|
.build();
|
||||||
assertThat(response).containsEntry("status", "SUCCESS");
|
assertThat(response).containsEntry("status", "SUCCESS");
|
||||||
assertThat(response).containsEntry("results", asList(modified.toJsonMap()));
|
assertThat(response).containsEntry("results", asList(modified.toJsonMap()));
|
||||||
|
|
|
@ -44,7 +44,7 @@ public class WhoisSettingsTest extends RegistrarSettingsActionTestCase {
|
||||||
.setEmailAddress("hello.kitty@example.com")
|
.setEmailAddress("hello.kitty@example.com")
|
||||||
.setPhoneNumber("+1.2125650000")
|
.setPhoneNumber("+1.2125650000")
|
||||||
.setFaxNumber("+1.2125650001")
|
.setFaxNumber("+1.2125650001")
|
||||||
.setReferralUrl("http://acme.com/")
|
.setUrl("http://acme.com/")
|
||||||
.setWhoisServer("ns1.foo.bar")
|
.setWhoisServer("ns1.foo.bar")
|
||||||
.setLocalizedAddress(
|
.setLocalizedAddress(
|
||||||
new RegistrarAddress.Builder()
|
new RegistrarAddress.Builder()
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
"url": null,
|
"url": null,
|
||||||
"icannReferralEmail": "asdf@asdf.com",
|
"icannReferralEmail": "asdf@asdf.com",
|
||||||
"phonePasscode": null,
|
"phonePasscode": null,
|
||||||
"referralUrl": "",
|
"url": "http://my.new.url",
|
||||||
"blockPremiumNames": false,
|
"blockPremiumNames": false,
|
||||||
"lastCertificateUpdateTime": null,
|
"lastCertificateUpdateTime": null,
|
||||||
"e": false
|
"e": false
|
||||||
|
|
|
@ -7,6 +7,7 @@ localizedAddress.city: Williamsburg -> New York
|
||||||
localizedAddress.zip: 11211 -> 10011
|
localizedAddress.zip: 11211 -> 10011
|
||||||
phoneNumber: +1.2223334444 -> +1.2223335555
|
phoneNumber: +1.2223334444 -> +1.2223335555
|
||||||
emailAddress: new.registrar@example.com -> thase@the.registrar
|
emailAddress: new.registrar@example.com -> thase@the.registrar
|
||||||
|
url: http://my.fake.url -> http://my.new.url
|
||||||
contacts:
|
contacts:
|
||||||
ADDED:
|
ADDED:
|
||||||
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=null, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false}
|
{parent=Key<?>(EntityGroupRoot("cross-tld")/Registrar("TheRegistrar")), name=Extra Terrestrial, emailAddress=etphonehome@example.com, phoneNumber=null, faxNumber=null, types=[ADMIN, BILLING, TECH, WHOIS], gaeUserId=null, visibleInWhoisAsAdmin=true, visibleInWhoisAsTech=false, visibleInDomainWhoisAsAbuse=false}
|
||||||
|
|
|
@ -62,7 +62,6 @@ public class RegistrarWhoisResponseTest {
|
||||||
.setFaxNumber("+1.3105551213")
|
.setFaxNumber("+1.3105551213")
|
||||||
.setEmailAddress("registrar@example.tld")
|
.setEmailAddress("registrar@example.tld")
|
||||||
.setWhoisServer("whois.example-registrar.tld")
|
.setWhoisServer("whois.example-registrar.tld")
|
||||||
.setReferralUrl("http://www.example-registrar.tld")
|
|
||||||
.setUrl("http://my.fake.url")
|
.setUrl("http://my.fake.url")
|
||||||
.build();
|
.build();
|
||||||
// Use the registrar key for contacts' parent.
|
// Use the registrar key for contacts' parent.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue