mirror of
https://github.com/google/nomulus.git
synced 2025-05-12 22:38:16 +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
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue