diff --git a/java/google/registry/flows/FlowMetadata.java b/java/google/registry/flows/FlowMetadata.java new file mode 100644 index 000000000..a4bcd13ae --- /dev/null +++ b/java/google/registry/flows/FlowMetadata.java @@ -0,0 +1,38 @@ +// Copyright 2016 The Nomulus Authors. All Rights Reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package google.registry.flows; + +import com.google.auto.value.AutoValue; +import google.registry.model.ImmutableObject; + +/** Object to hold metadata specific to a particular execution of a flow. */ +@AutoValue +public abstract class FlowMetadata extends ImmutableObject { + + public abstract boolean isSuperuser(); + + public static Builder newBuilder() { + return new AutoValue_FlowMetadata.Builder(); + } + + /** Builder for {@link FlowMetadata} */ + @AutoValue.Builder + public abstract static class Builder { + + public abstract Builder setSuperuser(boolean isSuperuser); + + public abstract FlowMetadata build(); + } +} diff --git a/java/google/registry/flows/FlowModule.java b/java/google/registry/flows/FlowModule.java index 72b556e29..7cad6e83f 100644 --- a/java/google/registry/flows/FlowModule.java +++ b/java/google/registry/flows/FlowModule.java @@ -259,6 +259,11 @@ public class FlowModule { .setResultFromCode(Result.Code.SUCCESS); // Default to success. } + @Provides + static FlowMetadata provideFlowMetadata(@Superuser boolean isSuperuser) { + return FlowMetadata.newBuilder().setSuperuser(isSuperuser).build(); + } + /** Wrapper class to carry an {@link EppException} to the calling code. */ static class EppExceptionInProviderException extends RuntimeException { EppExceptionInProviderException(EppException exception) { diff --git a/java/google/registry/flows/custom/BaseFlowCustomLogic.java b/java/google/registry/flows/custom/BaseFlowCustomLogic.java index fcec87ab2..ca6764932 100644 --- a/java/google/registry/flows/custom/BaseFlowCustomLogic.java +++ b/java/google/registry/flows/custom/BaseFlowCustomLogic.java @@ -14,6 +14,7 @@ package google.registry.flows.custom; +import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; import google.registry.model.eppinput.EppInput; @@ -25,10 +26,13 @@ public abstract class BaseFlowCustomLogic { private final EppInput eppInput; private final SessionMetadata sessionMetadata; + private final FlowMetadata flowMetadata; - protected BaseFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) { + protected BaseFlowCustomLogic( + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { this.eppInput = eppInput; this.sessionMetadata = sessionMetadata; + this.flowMetadata = flowMetadata; } protected EppInput getEppInput() { @@ -38,4 +42,8 @@ public abstract class BaseFlowCustomLogic { protected SessionMetadata getSessionMetadata() { return sessionMetadata; } + + protected FlowMetadata getFlowMetadata() { + return flowMetadata; + } } diff --git a/java/google/registry/flows/custom/CustomLogicFactory.java b/java/google/registry/flows/custom/CustomLogicFactory.java index 11a9a5f8a..f9bd1bc74 100644 --- a/java/google/registry/flows/custom/CustomLogicFactory.java +++ b/java/google/registry/flows/custom/CustomLogicFactory.java @@ -15,6 +15,7 @@ package google.registry.flows.custom; import google.registry.config.RegistryConfig.ConfigModule; +import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; import google.registry.model.eppinput.EppInput; @@ -32,42 +33,42 @@ import google.registry.model.eppinput.EppInput; public class CustomLogicFactory { public DomainApplicationCreateFlowCustomLogic forDomainApplicationCreateFlow( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainApplicationCreateFlowCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainApplicationCreateFlowCustomLogic(eppInput, sessionMetadata, flowMetadata); } public DomainCreateFlowCustomLogic forDomainCreateFlow( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainCreateFlowCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainCreateFlowCustomLogic(eppInput, sessionMetadata, flowMetadata); } public DomainCheckFlowCustomLogic forDomainCheckFlow( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainCheckFlowCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainCheckFlowCustomLogic(eppInput, sessionMetadata, flowMetadata); } public DomainInfoFlowCustomLogic forDomainInfoFlow( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainInfoFlowCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainInfoFlowCustomLogic(eppInput, sessionMetadata, flowMetadata); } public DomainUpdateFlowCustomLogic forDomainUpdateFlow( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainUpdateFlowCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainUpdateFlowCustomLogic(eppInput, sessionMetadata, flowMetadata); } public DomainRenewFlowCustomLogic forDomainRenewFlow( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainRenewFlowCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainRenewFlowCustomLogic(eppInput, sessionMetadata, flowMetadata); } public DomainDeleteFlowCustomLogic forDomainDeleteFlow( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainDeleteFlowCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainDeleteFlowCustomLogic(eppInput, sessionMetadata, flowMetadata); } public DomainPricingCustomLogic forDomainPricing( - EppInput eppInput, SessionMetadata sessionMetadata) { - return new DomainPricingCustomLogic(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + return new DomainPricingCustomLogic(eppInput, sessionMetadata, flowMetadata); } } diff --git a/java/google/registry/flows/custom/CustomLogicModule.java b/java/google/registry/flows/custom/CustomLogicModule.java index 003439e2b..391d3d0f6 100644 --- a/java/google/registry/flows/custom/CustomLogicModule.java +++ b/java/google/registry/flows/custom/CustomLogicModule.java @@ -16,6 +16,7 @@ package google.registry.flows.custom; import dagger.Module; import dagger.Provides; +import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; import google.registry.model.eppinput.EppInput; @@ -25,49 +26,73 @@ public class CustomLogicModule { @Provides static DomainApplicationCreateFlowCustomLogic provideDomainApplicationCreateFlowCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainApplicationCreateFlow(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainApplicationCreateFlow(eppInput, sessionMetadata, flowMetadata); } @Provides static DomainCreateFlowCustomLogic provideDomainCreateFlowCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainCreateFlow(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainCreateFlow(eppInput, sessionMetadata, flowMetadata); } @Provides static DomainCheckFlowCustomLogic provideDomainCheckFlowCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainCheckFlow(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainCheckFlow(eppInput, sessionMetadata, flowMetadata); } @Provides static DomainInfoFlowCustomLogic provideDomainInfoFlowCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainInfoFlow(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainInfoFlow(eppInput, sessionMetadata, flowMetadata); } @Provides static DomainUpdateFlowCustomLogic provideDomainUpdateFlowCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainUpdateFlow(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainUpdateFlow(eppInput, sessionMetadata, flowMetadata); } @Provides static DomainRenewFlowCustomLogic provideDomainRenewFlowCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainRenewFlow(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainRenewFlow(eppInput, sessionMetadata, flowMetadata); } @Provides static DomainDeleteFlowCustomLogic provideDomainDeleteFlowCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainDeleteFlow(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainDeleteFlow(eppInput, sessionMetadata, flowMetadata); } @Provides static DomainPricingCustomLogic provideDomainPricingCustomLogic( - CustomLogicFactory factory, EppInput eppInput, SessionMetadata sessionMetadata) { - return factory.forDomainPricing(eppInput, sessionMetadata); + CustomLogicFactory factory, + EppInput eppInput, + SessionMetadata sessionMetadata, + FlowMetadata flowMetadata) { + return factory.forDomainPricing(eppInput, sessionMetadata, flowMetadata); } } diff --git a/java/google/registry/flows/custom/DomainApplicationCreateFlowCustomLogic.java b/java/google/registry/flows/custom/DomainApplicationCreateFlowCustomLogic.java index 652d1669b..2694c6335 100644 --- a/java/google/registry/flows/custom/DomainApplicationCreateFlowCustomLogic.java +++ b/java/google/registry/flows/custom/DomainApplicationCreateFlowCustomLogic.java @@ -18,6 +18,7 @@ import com.google.auto.value.AutoValue; import com.google.common.collect.ImmutableList; import com.google.common.net.InternetDomainName; import google.registry.flows.EppException; +import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; import google.registry.flows.domain.DomainApplicationCreateFlow; import google.registry.model.ImmutableObject; @@ -35,8 +36,8 @@ import google.registry.model.reporting.HistoryEntry; public class DomainApplicationCreateFlowCustomLogic extends BaseFlowCustomLogic { protected DomainApplicationCreateFlowCustomLogic( - EppInput eppInput, SessionMetadata sessionMetadata) { - super(eppInput, sessionMetadata); + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + super(eppInput, sessionMetadata, flowMetadata); } /** A hook that runs before any validation. This is useful to e.g. add allowable extensions. */ diff --git a/java/google/registry/flows/custom/DomainCheckFlowCustomLogic.java b/java/google/registry/flows/custom/DomainCheckFlowCustomLogic.java index 3a204c752..af32cf271 100644 --- a/java/google/registry/flows/custom/DomainCheckFlowCustomLogic.java +++ b/java/google/registry/flows/custom/DomainCheckFlowCustomLogic.java @@ -19,6 +19,7 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.net.InternetDomainName; import google.registry.flows.EppException; +import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; import google.registry.flows.domain.DomainCheckFlow; import google.registry.model.ImmutableObject; @@ -34,13 +35,12 @@ import org.joda.time.DateTime; */ public class DomainCheckFlowCustomLogic extends BaseFlowCustomLogic { - protected DomainCheckFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) { - super(eppInput, sessionMetadata); + protected DomainCheckFlowCustomLogic( + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + super(eppInput, sessionMetadata, flowMetadata); } - /** - * A hook that runs before any validation. This is useful to e.g. add allowable extensions. - */ + /** A hook that runs before any validation. This is useful to e.g. add allowable extensions. */ @SuppressWarnings("unused") public void beforeValidation() throws EppException { // Do nothing. diff --git a/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java b/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java index d547c84cf..cf466f3d9 100644 --- a/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java +++ b/java/google/registry/flows/custom/DomainCreateFlowCustomLogic.java @@ -19,6 +19,7 @@ import com.google.common.base.Optional; import com.google.common.collect.ImmutableList; import com.google.common.net.InternetDomainName; import google.registry.flows.EppException; +import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; import google.registry.flows.domain.DomainCreateFlow; import google.registry.model.ImmutableObject; @@ -35,8 +36,9 @@ import google.registry.model.reporting.HistoryEntry; */ public class DomainCreateFlowCustomLogic extends BaseFlowCustomLogic { - protected DomainCreateFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) { - super(eppInput, sessionMetadata); + protected DomainCreateFlowCustomLogic( + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + super(eppInput, sessionMetadata, flowMetadata); } /** A hook that runs before any validation. This is useful to e.g. add allowable extensions. */ diff --git a/java/google/registry/flows/custom/DomainDeleteFlowCustomLogic.java b/java/google/registry/flows/custom/DomainDeleteFlowCustomLogic.java index f9a45c22f..f269f02a5 100644 --- a/java/google/registry/flows/custom/DomainDeleteFlowCustomLogic.java +++ b/java/google/registry/flows/custom/DomainDeleteFlowCustomLogic.java @@ -17,6 +17,7 @@ package google.registry.flows.custom; import com.google.auto.value.AutoValue; import com.google.common.collect.ImmutableList; import google.registry.flows.EppException; +import google.registry.flows.FlowMetadata; import google.registry.flows.SessionMetadata; import google.registry.flows.domain.DomainDeleteFlow; import google.registry.model.ImmutableObject; @@ -33,8 +34,9 @@ import google.registry.model.reporting.HistoryEntry; */ public class DomainDeleteFlowCustomLogic extends BaseFlowCustomLogic { - protected DomainDeleteFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) { - super(eppInput, sessionMetadata); + protected DomainDeleteFlowCustomLogic( + EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) { + super(eppInput, sessionMetadata, flowMetadata); } /** A hook that runs before any validation. This is useful to e.g. add allowable extensions. */ @@ -65,10 +67,9 @@ public class DomainDeleteFlowCustomLogic extends BaseFlowCustomLogic { /** * A hook that runs before the response is returned. * - *
This takes the {@link Result.Code} and {@link ResponseExtension}s as input and returns - * them, potentially with modifications. + *
This takes the {@link Result.Code} and {@link ResponseExtension}s as input and returns them,
+ * potentially with modifications.
*/
-
@SuppressWarnings("unused")
public BeforeResponseReturnData beforeResponse(BeforeResponseParameters parameters)
throws EppException {
@@ -114,7 +115,6 @@ public class DomainDeleteFlowCustomLogic extends BaseFlowCustomLogic {
public abstract HistoryEntry historyEntry();
-
public abstract EntityChanges entityChanges();
public static Builder newBuilder() {
@@ -136,7 +136,7 @@ public class DomainDeleteFlowCustomLogic extends BaseFlowCustomLogic {
public abstract BeforeSaveParameters build();
}
}
- /** A class to encapsulate parameters for a call to {@link #beforeResponse}. */
+ /** A class to encapsulate parameters for a call to {@link #beforeResponse}. */
@AutoValue
public abstract static class BeforeResponseParameters extends ImmutableObject {
diff --git a/java/google/registry/flows/custom/DomainInfoFlowCustomLogic.java b/java/google/registry/flows/custom/DomainInfoFlowCustomLogic.java
index db95919dd..ce368bfea 100644
--- a/java/google/registry/flows/custom/DomainInfoFlowCustomLogic.java
+++ b/java/google/registry/flows/custom/DomainInfoFlowCustomLogic.java
@@ -17,6 +17,7 @@ package google.registry.flows.custom;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import google.registry.flows.EppException;
+import google.registry.flows.FlowMetadata;
import google.registry.flows.SessionMetadata;
import google.registry.flows.domain.DomainInfoFlow;
import google.registry.model.ImmutableObject;
@@ -31,8 +32,9 @@ import google.registry.model.eppoutput.EppResponse.ResponseExtension;
*/
public class DomainInfoFlowCustomLogic extends BaseFlowCustomLogic {
- protected DomainInfoFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) {
- super(eppInput, sessionMetadata);
+ protected DomainInfoFlowCustomLogic(
+ EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) {
+ super(eppInput, sessionMetadata, flowMetadata);
}
/** A hook that runs before any validation. This is useful to e.g. add allowable extensions. */
diff --git a/java/google/registry/flows/custom/DomainPricingCustomLogic.java b/java/google/registry/flows/custom/DomainPricingCustomLogic.java
index 7955fd707..369ac82fa 100644
--- a/java/google/registry/flows/custom/DomainPricingCustomLogic.java
+++ b/java/google/registry/flows/custom/DomainPricingCustomLogic.java
@@ -17,6 +17,7 @@ package google.registry.flows.custom;
import com.google.auto.value.AutoValue;
import com.google.common.net.InternetDomainName;
import google.registry.flows.EppException;
+import google.registry.flows.FlowMetadata;
import google.registry.flows.SessionMetadata;
import google.registry.flows.domain.DomainPricingLogic;
import google.registry.flows.domain.FeesAndCredits;
@@ -33,8 +34,9 @@ import org.joda.time.DateTime;
*/
public class DomainPricingCustomLogic extends BaseFlowCustomLogic {
- protected DomainPricingCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) {
- super(eppInput, sessionMetadata);
+ protected DomainPricingCustomLogic(
+ EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) {
+ super(eppInput, sessionMetadata, flowMetadata);
}
/** A hook that customizes the application update price. */
diff --git a/java/google/registry/flows/custom/DomainRenewFlowCustomLogic.java b/java/google/registry/flows/custom/DomainRenewFlowCustomLogic.java
index 18eaf1879..b06723371 100644
--- a/java/google/registry/flows/custom/DomainRenewFlowCustomLogic.java
+++ b/java/google/registry/flows/custom/DomainRenewFlowCustomLogic.java
@@ -17,6 +17,7 @@ package google.registry.flows.custom;
import com.google.auto.value.AutoValue;
import com.google.common.collect.ImmutableList;
import google.registry.flows.EppException;
+import google.registry.flows.FlowMetadata;
import google.registry.flows.SessionMetadata;
import google.registry.flows.domain.DomainRenewFlow;
import google.registry.model.ImmutableObject;
@@ -34,8 +35,9 @@ import org.joda.time.DateTime;
*/
public class DomainRenewFlowCustomLogic extends BaseFlowCustomLogic {
- protected DomainRenewFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) {
- super(eppInput, sessionMetadata);
+ protected DomainRenewFlowCustomLogic(
+ EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) {
+ super(eppInput, sessionMetadata, flowMetadata);
}
/** A hook that runs before any validation. This is useful to e.g. add allowable extensions. */
diff --git a/java/google/registry/flows/custom/DomainUpdateFlowCustomLogic.java b/java/google/registry/flows/custom/DomainUpdateFlowCustomLogic.java
index 6964fd861..6ba4bf520 100644
--- a/java/google/registry/flows/custom/DomainUpdateFlowCustomLogic.java
+++ b/java/google/registry/flows/custom/DomainUpdateFlowCustomLogic.java
@@ -16,6 +16,7 @@ package google.registry.flows.custom;
import com.google.auto.value.AutoValue;
import google.registry.flows.EppException;
+import google.registry.flows.FlowMetadata;
import google.registry.flows.SessionMetadata;
import google.registry.flows.domain.DomainUpdateFlow;
import google.registry.model.ImmutableObject;
@@ -30,8 +31,9 @@ import google.registry.model.reporting.HistoryEntry;
*/
public class DomainUpdateFlowCustomLogic extends BaseFlowCustomLogic {
- protected DomainUpdateFlowCustomLogic(EppInput eppInput, SessionMetadata sessionMetadata) {
- super(eppInput, sessionMetadata);
+ protected DomainUpdateFlowCustomLogic(
+ EppInput eppInput, SessionMetadata sessionMetadata, FlowMetadata flowMetadata) {
+ super(eppInput, sessionMetadata, flowMetadata);
}
/** A hook that runs before any validation. This is useful to e.g. add allowable extensions. */
@@ -95,7 +97,6 @@ public class DomainUpdateFlowCustomLogic extends BaseFlowCustomLogic {
public abstract HistoryEntry historyEntry();
-
public abstract EntityChanges entityChanges();
public static Builder newBuilder() {
diff --git a/java/google/registry/flows/domain/DomainCreateFlow.java b/java/google/registry/flows/domain/DomainCreateFlow.java
index 76680ce17..dd1811d38 100644
--- a/java/google/registry/flows/domain/DomainCreateFlow.java
+++ b/java/google/registry/flows/domain/DomainCreateFlow.java
@@ -201,6 +201,7 @@ public class DomainCreateFlow implements TransactionalFlow {
validateLaunchCreateNotice(launchCreate.getNotice(), domainLabel, isSuperuser, now);
}
boolean isSunriseCreate = hasSignedMarks && SUNRISE_STATES.contains(tldState);
+ String signedMarkId = null;
// 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
// registering premium domains.
@@ -221,12 +222,12 @@ public class DomainCreateFlow implements TransactionalFlow {
verifyPremiumNameIsNotBlocked(targetId, now, clientId);
verifyNoOpenApplications(now);
verifyIsGaOrIsSpecialCase(tldState, isAnchorTenant);
- }
- String signedMarkId = hasSignedMarks
+ signedMarkId = hasSignedMarks
// If a signed mark was provided, then it must match the desired domain label. Get the mark
// at this point so that we can verify it before the "after validation" extension point.
? tmchUtils.verifySignedMarks(launchCreate.getSignedMarks(), domainLabel, now).getId()
: null;
+ }
customLogic.afterValidation(
DomainCreateFlowCustomLogic.AfterValidationParameters.newBuilder()
.setDomainName(domainName)
diff --git a/javatests/google/registry/flows/FlowTestCase.java b/javatests/google/registry/flows/FlowTestCase.java
index c23df7cc2..546be44f7 100644
--- a/javatests/google/registry/flows/FlowTestCase.java
+++ b/javatests/google/registry/flows/FlowTestCase.java
@@ -308,6 +308,11 @@ public abstract class FlowTestCase