mirror of
https://github.com/google/nomulus
synced 2026-09-06 08:07:03 +00:00
Add a boolean for when a registrar has enabled registry lock (#228)
* Add a boolean for when a registrar has enabled registry lock * enabled -> allowed * get -> is
This commit is contained in:
@@ -409,6 +409,9 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||
*/
|
||||
boolean contactsRequireSyncing = true;
|
||||
|
||||
/** Whether or not registry lock is allowed for this registrar. */
|
||||
boolean registryLockAllowed = false;
|
||||
|
||||
@NonFinalForTesting
|
||||
private static Supplier<byte[]> saltSupplier =
|
||||
() -> {
|
||||
@@ -545,6 +548,10 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||
return contactsRequireSyncing;
|
||||
}
|
||||
|
||||
public boolean isRegistryLockAllowed() {
|
||||
return registryLockAllowed;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
@@ -895,6 +902,11 @@ public class Registrar extends ImmutableObject implements Buildable, Jsonifiable
|
||||
return this;
|
||||
}
|
||||
|
||||
public Builder setRegistryLockAllowed(boolean registryLockAllowed) {
|
||||
getInstance().registryLockAllowed = registryLockAllowed;
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Build the registrar, nullifying empty fields. */
|
||||
@Override
|
||||
public Registrar build() {
|
||||
|
||||
@@ -234,6 +234,13 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
|
||||
arity = 1)
|
||||
private Boolean contactsRequireSyncing;
|
||||
|
||||
@Nullable
|
||||
@Parameter(
|
||||
names = "--registry_lock_allowed",
|
||||
description = "Whether this registrar is allowed to use registry lock",
|
||||
arity = 1)
|
||||
private Boolean registryLockAllowed;
|
||||
|
||||
@Nullable
|
||||
@Parameter(
|
||||
names = "--drive_folder_id",
|
||||
@@ -393,6 +400,7 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
|
||||
}
|
||||
Optional.ofNullable(blockPremiumNames).ifPresent(builder::setBlockPremiumNames);
|
||||
Optional.ofNullable(contactsRequireSyncing).ifPresent(builder::setContactsRequireSyncing);
|
||||
Optional.ofNullable(registryLockAllowed).ifPresent(builder::setRegistryLockAllowed);
|
||||
Optional.ofNullable(phonePasscode).ifPresent(builder::setPhonePasscode);
|
||||
Optional.ofNullable(icannReferralEmail).ifPresent(builder::setIcannReferralEmail);
|
||||
Optional.ofNullable(whoisServer).ifPresent(builder::setWhoisServer);
|
||||
|
||||
Reference in New Issue
Block a user