mirror of
https://github.com/google/nomulus.git
synced 2025-06-27 06:44:51 +02:00
Add FlowMetadata (containing isSuperuser) to custom flow logic
This also bypasses signed mark validation during domain creation if the flow is being executed as superuser. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145435268
This commit is contained in:
parent
d5160213e5
commit
f3388326d6
21 changed files with 213 additions and 74 deletions
|
@ -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.
|
||||
*
|
||||
* <p>This takes the {@link Result.Code} and {@link ResponseExtension}s as input and returns
|
||||
* them, potentially with modifications.
|
||||
* <p>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 {
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue