Remove authcode fallback for registering anchor tenants

We won't be using this for future launches, so get rid of it now.

Also reorganizes existing anchor tenant test cases and adds a new one for
creation of a TMDBed anchor tenant domain in sunrise.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=239669950
This commit is contained in:
mcilwain 2019-03-21 14:14:21 -07:00 committed by jianglai
parent 2481704d00
commit 6e1e4769a9
11 changed files with 137 additions and 147 deletions

View file

@ -89,7 +89,6 @@ import google.registry.model.domain.rgp.GracePeriodStatus;
import google.registry.model.domain.secdns.SecDnsCreateExtension;
import google.registry.model.domain.token.AllocationToken;
import google.registry.model.domain.token.AllocationTokenExtension;
import google.registry.model.eppcommon.AuthInfo;
import google.registry.model.eppcommon.StatusValue;
import google.registry.model.eppinput.EppInput;
import google.registry.model.eppinput.ResourceCommand;
@ -190,7 +189,6 @@ public class DomainCreateFlow implements TransactionalFlow {
@Inject ExtensionManager extensionManager;
@Inject EppInput eppInput;
@Inject AuthInfo authInfo;
@Inject ResourceCommand resourceCommand;
@Inject @ClientId String clientId;
@Inject @TargetId String targetId;
@ -241,15 +239,12 @@ public class DomainCreateFlow implements TransactionalFlow {
verifyNoCodeMarks(launchCreate.get());
validateLaunchCreateNotice(launchCreate.get().getNotice(), domainLabel, isSuperuser, now);
}
boolean isSunriseCreate = hasSignedMarks && tldState == START_DATE_SUNRISE;
boolean isSunriseCreate = hasSignedMarks && (tldState == START_DATE_SUNRISE);
Optional<AllocationToken> allocationToken =
verifyAllocationTokenIfPresent(command, registry, clientId, now);
boolean isAnchorTenant =
isAnchorTenant(
domainName,
allocationToken,
authInfo.getPw().getValue(),
eppInput.getSingleExtension(MetadataExtension.class));
domainName, allocationToken, eppInput.getSingleExtension(MetadataExtension.class));
verifyAnchorTenantValidPeriod(isAnchorTenant, years);
// Superusers can create reserved domains, force creations on domains that require a claims
// notice without specifying a claims key, ignore the registry phase, and override blocks on