mirror of
https://github.com/google/nomulus
synced 2026-08-21 06:36:15 +00:00
Scope down TransferData to only ContactResource and DomainResource
HostResource and DomainApplication are not transferable, (or at least, not directly in the case of hosts) and have no need for the TransferData field. In a flat-flow world, we can push it down to where it's actually used. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=139201423
This commit is contained in:
@@ -18,7 +18,6 @@ import static google.registry.flows.FlowUtils.validateClientIsLoggedIn;
|
||||
import static google.registry.flows.ResourceFlowUtils.denyPendingTransfer;
|
||||
import static google.registry.flows.ResourceFlowUtils.loadAndVerifyExistence;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyHasPendingTransfer;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyIsGainingRegistrar;
|
||||
import static google.registry.flows.ResourceFlowUtils.verifyOptionalAuthInfo;
|
||||
import static google.registry.flows.domain.DomainFlowUtils.checkAllowedAccessToTld;
|
||||
import static google.registry.flows.domain.DomainFlowUtils.createLosingTransferPollMessage;
|
||||
@@ -34,6 +33,7 @@ import google.registry.flows.ExtensionManager;
|
||||
import google.registry.flows.FlowModule.ClientId;
|
||||
import google.registry.flows.FlowModule.TargetId;
|
||||
import google.registry.flows.TransactionalFlow;
|
||||
import google.registry.flows.exceptions.NotTransferInitiatorException;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.domain.DomainResource;
|
||||
import google.registry.model.domain.metadata.MetadataExtension;
|
||||
@@ -81,7 +81,9 @@ public final class DomainTransferCancelFlow implements TransactionalFlow {
|
||||
DomainResource existingDomain = loadAndVerifyExistence(DomainResource.class, targetId, now);
|
||||
verifyOptionalAuthInfo(authInfo, existingDomain);
|
||||
verifyHasPendingTransfer(existingDomain);
|
||||
verifyIsGainingRegistrar(existingDomain, clientId);
|
||||
if (!clientId.equals(existingDomain.getTransferData().getGainingClientId())) {
|
||||
throw new NotTransferInitiatorException();
|
||||
}
|
||||
checkAllowedAccessToTld(clientId, existingDomain.getTld());
|
||||
HistoryEntry historyEntry = historyBuilder
|
||||
.setType(HistoryEntry.Type.DOMAIN_TRANSFER_CANCEL)
|
||||
|
||||
Reference in New Issue
Block a user