mirror of
https://github.com/google/nomulus
synced 2026-09-25 17:34:20 +00:00
Don't allow package tokens to discount premium names (#1804)
This commit is contained in:
@@ -300,6 +300,9 @@ public class AllocationToken extends BackupGroupRoot implements Buildable {
|
||||
!getInstance().tokenType.equals(TokenType.PACKAGE)
|
||||
|| getInstance().renewalPriceBehavior.equals(RenewalPriceBehavior.SPECIFIED),
|
||||
"Package tokens must have renewalPriceBehavior set to SPECIFIED");
|
||||
checkArgument(
|
||||
!getInstance().tokenType.equals(TokenType.PACKAGE) || !getInstance().discountPremiums,
|
||||
"Package tokens cannot discount premium names");
|
||||
checkArgument(
|
||||
getInstance().domainName == null || TokenType.SINGLE_USE.equals(getInstance().tokenType),
|
||||
"Domain name can only be specified for SINGLE_USE tokens");
|
||||
|
||||
Reference in New Issue
Block a user