diff --git a/docs/flows.md b/docs/flows.md index daafc0ab3..abb92afc5 100644 --- a/docs/flows.md +++ b/docs/flows.md @@ -545,9 +545,6 @@ comes in at the exact millisecond that the domain would have expired. * 2201 * The specified resource belongs to another client. * Registrar is not authorized to access this TLD. -* 2300 - * The domain has a pending transfer on it and so can't be explicitly - renewed. * 2303 * Resource with this id does not exist. * 2304 diff --git a/java/google/registry/flows/domain/DomainRenewFlow.java b/java/google/registry/flows/domain/DomainRenewFlow.java index dcc53ed8e..528c50faa 100644 --- a/java/google/registry/flows/domain/DomainRenewFlow.java +++ b/java/google/registry/flows/domain/DomainRenewFlow.java @@ -35,7 +35,6 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import com.googlecode.objectify.Key; import google.registry.flows.EppException; -import google.registry.flows.EppException.ObjectPendingTransferException; import google.registry.flows.EppException.ParameterValueRangeErrorException; import google.registry.flows.ExtensionManager; import google.registry.flows.FlowModule.ClientId; @@ -70,7 +69,6 @@ import google.registry.model.eppoutput.EppResponse; import google.registry.model.poll.PollMessage; import google.registry.model.registry.Registry; import google.registry.model.reporting.HistoryEntry; -import google.registry.model.transfer.TransferStatus; import javax.inject.Inject; import org.joda.money.Money; import org.joda.time.DateTime; @@ -99,7 +97,6 @@ import org.joda.time.DateTime; * @error {@link DomainFlowUtils.FeesRequiredForPremiumNameException} * @error {@link DomainFlowUtils.NotAuthorizedForTldException} * @error {@link DomainFlowUtils.UnsupportedFeeAttributeException} - * @error {@link DomainRenewFlow.DomainHasPendingTransferException} * @error {@link DomainRenewFlow.IncorrectCurrentExpirationDateException} */ public final class DomainRenewFlow implements TransactionalFlow { @@ -107,6 +104,8 @@ public final class DomainRenewFlow implements TransactionalFlow { private static final ImmutableSet RENEW_DISALLOWED_STATUSES = ImmutableSet.of( StatusValue.CLIENT_RENEW_PROHIBITED, StatusValue.PENDING_DELETE, + // Disallow renews during pendingTransfer; it needlessly complicates server-approve transfers. + StatusValue.PENDING_TRANSFER, StatusValue.SERVER_RENEW_PROHIBITED); @Inject ResourceCommand resourceCommand; @@ -219,10 +218,6 @@ public final class DomainRenewFlow implements TransactionalFlow { verifyResourceOwnership(clientId, existingDomain); } checkAllowedAccessToTld(clientId, existingDomain.getTld()); - // Verify that the resource does not have a pending transfer on it. - if (existingDomain.getTransferData().getTransferStatus() == TransferStatus.PENDING) { - throw new DomainHasPendingTransferException(targetId); - } verifyUnitIsYears(command.getPeriod()); // If the date they specify doesn't match the expiration, fail. (This is an idempotence check). if (!command.getCurrentExpirationDate().equals( @@ -255,13 +250,6 @@ public final class DomainRenewFlow implements TransactionalFlow { .build()); } - /** The domain has a pending transfer on it and so can't be explicitly renewed. */ - public static class DomainHasPendingTransferException extends ObjectPendingTransferException { - public DomainHasPendingTransferException(String targetId) { - super(targetId); - } - } - /** The current expiration date is incorrect. */ static class IncorrectCurrentExpirationDateException extends ParameterValueRangeErrorException { public IncorrectCurrentExpirationDateException() { diff --git a/javatests/google/registry/flows/domain/DomainRenewFlowTest.java b/javatests/google/registry/flows/domain/DomainRenewFlowTest.java index 1ed1e9504..1f09199b9 100644 --- a/javatests/google/registry/flows/domain/DomainRenewFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainRenewFlowTest.java @@ -46,7 +46,6 @@ import google.registry.flows.domain.DomainFlowUtils.FeesMismatchException; import google.registry.flows.domain.DomainFlowUtils.FeesRequiredForPremiumNameException; import google.registry.flows.domain.DomainFlowUtils.NotAuthorizedForTldException; import google.registry.flows.domain.DomainFlowUtils.UnsupportedFeeAttributeException; -import google.registry.flows.domain.DomainRenewFlow.DomainHasPendingTransferException; import google.registry.flows.domain.DomainRenewFlow.IncorrectCurrentExpirationDateException; import google.registry.flows.exceptions.ResourceStatusProhibitsOperationException; import google.registry.model.billing.BillingEvent; @@ -573,7 +572,7 @@ public class DomainRenewFlowTest extends ResourceFlowTestCase