mirror of
https://github.com/google/nomulus
synced 2026-09-04 15:17:13 +00:00
Adds the ability to whitelist registrants and nameservers on a TLD
This is needed for ROCC TLDs like .foo ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=118404870
This commit is contained in:
committed by
Justine Tunney
parent
f9e1bab1d2
commit
ec2daec412
@@ -343,6 +343,12 @@ public class Registry extends BackupGroupRoot implements Buildable {
|
||||
/** The end of the claims period (at or after this time, claims no longer applies). */
|
||||
DateTime claimsPeriodEnd = END_OF_TIME;
|
||||
|
||||
/** A whitelist of clients allowed to be used on domains on this TLD (ignored if empty). */
|
||||
Set<String> allowedRegistrantContactIds;
|
||||
|
||||
/** A whitelist of hosts allowed to be used on domains on this TLD (ignored if empty). */
|
||||
Set<String> allowedFullyQualifiedHostNames;
|
||||
|
||||
public String getTldStr() {
|
||||
return tldStr;
|
||||
}
|
||||
@@ -521,6 +527,14 @@ public class Registry extends BackupGroupRoot implements Buildable {
|
||||
return claimsPeriodEnd;
|
||||
}
|
||||
|
||||
public ImmutableSet<String> getAllowedRegistrantContactIds() {
|
||||
return nullToEmptyImmutableCopy(allowedRegistrantContactIds);
|
||||
}
|
||||
|
||||
public ImmutableSet<String> getAllowedFullyQualifiedHostNames() {
|
||||
return nullToEmptyImmutableCopy(allowedFullyQualifiedHostNames);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Builder asBuilder() {
|
||||
return new Builder(clone(this));
|
||||
@@ -734,6 +748,18 @@ public class Registry extends BackupGroupRoot implements Buildable {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAllowedRegistrantContactIds(
|
||||
ImmutableSet<String> allowedRegistrantContactIds) {
|
||||
getInstance().allowedRegistrantContactIds = allowedRegistrantContactIds;
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setAllowedFullyQualifiedHostNames(
|
||||
ImmutableSet<String> allowedFullyQualifiedHostNames) {
|
||||
getInstance().allowedFullyQualifiedHostNames = allowedFullyQualifiedHostNames;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Registry build() {
|
||||
final Registry instance = getInstance();
|
||||
|
||||
Reference in New Issue
Block a user