Add support for a domain transfer request superuser EPP extension

Allow superusers to change the transfer period to zero years and allow
superusers to change the automatic transfer length.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=167598314
This commit is contained in:
bbilbo 2017-09-05 10:39:03 -07:00 committed by jianglai
parent 263aea3b2a
commit 2e4b63bb79
28 changed files with 1018 additions and 124 deletions

View file

@ -42,6 +42,8 @@ import google.registry.gcs.GcsUtils;
import google.registry.mapreduce.MapreduceRunner;
import google.registry.model.billing.BillingEvent;
import google.registry.model.domain.DomainResource;
import google.registry.model.domain.Period;
import google.registry.model.domain.Period.Unit;
import google.registry.model.poll.PollMessage;
import google.registry.model.reporting.HistoryEntry;
import google.registry.model.transfer.TransferData;
@ -203,10 +205,13 @@ public class RdeDomainImportAction implements Runnable {
domain,
historyEntry.getTrid(),
transferData.getGainingClientId(),
transferCost,
Optional.of(transferCost),
transferData.getTransferRequestTime());
transferData =
createPendingTransferData(transferData.asBuilder(), serverApproveEntities);
createPendingTransferData(
transferData.asBuilder(),
serverApproveEntities,
Period.create(1, Unit.YEARS));
// Create a poll message to notify the losing registrar that a transfer was requested.
PollMessage requestPollMessage = createLosingTransferPollMessage(domain.getRepoId(),
transferData, transferData.getPendingTransferExpirationTime(), historyEntry)