mirror of
https://github.com/google/nomulus.git
synced 2025-05-16 09:27:16 +02:00
Add the ability to require premium fee acking for a registrar
When enabled for a registrar, all EPP operations on premium domains that have costs (e.g. creates, renews, transfers) will fail unless the EPP fee extension is used to explicitly ack the amount of fee as part of the EPP transaction. This ack is required regardless of whether premium fee acking is required at the registry level. No data migration is necessary since false is the desired default for this new attribute. This CL also contains some slight refactoring of static utility methods used to perform fee verification; there was short-circuiting at call-sites in two places when what was really needed was two methods, one implementing additional functionality on top of the other, and calling the inner method in the places where short-circuiting had previously been necessary. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=184229363
This commit is contained in:
parent
6bcd40f18a
commit
98a61b8181
20 changed files with 264 additions and 119 deletions
|
@ -412,6 +412,13 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
|||
*/
|
||||
BillingMethod billingMethod;
|
||||
|
||||
/** Whether the registrar must acknowledge the price to register non-standard-priced domains. */
|
||||
boolean premiumPriceAckRequired;
|
||||
|
||||
public boolean getPremiumPriceAckRequired() {
|
||||
return premiumPriceAckRequired;
|
||||
}
|
||||
|
||||
@NonFinalForTesting
|
||||
private static Supplier<byte[]> saltSupplier =
|
||||
() -> {
|
||||
|
@ -864,6 +871,11 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder setPremiumPriceAckRequired(boolean premiumPriceAckRequired) {
|
||||
getInstance().premiumPriceAckRequired = premiumPriceAckRequired;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Build the registrar, nullifying empty fields. */
|
||||
@Override
|
||||
public Registrar build() {
|
||||
|
|
|
@ -318,7 +318,7 @@ public class Registry extends ImmutableObject implements Buildable {
|
|||
/** Whether the pull queue that writes to authoritative DNS is paused for this TLD. */
|
||||
boolean dnsPaused = DEFAULT_DNS_PAUSED;
|
||||
|
||||
/** Whether the price must be acknowledged to register premiun names on this TLD. */
|
||||
/** Whether the price must be acknowledged to register premium names on this TLD. */
|
||||
boolean premiumPriceAckRequired = true;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue