Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ eapFeeSchedule:
currency: "USD"
amount: 0.00
escrowEnabled: false
expiryAccessPeriodTransitions:
"1970-01-01T00:00:00.000Z": "DISABLED"
idnTables: []
invoicingEnabled: false
lordnUsername: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,13 @@ abstract class CreateOrUpdateRegistrarCommand extends MutatingCommand {
arity = 1)
private Boolean registryLockAllowed;

@Nullable
@Parameter(
names = "--expiry_access_period_enabled",
description = "Whether this registrar is enabled for the Expiry Access Period",
arity = 1)
private Boolean expiryAccessPeriodEnabled;

@Nullable
@Parameter(
names = "--drive_folder_id",
Expand Down Expand Up @@ -384,6 +391,8 @@ protected final void init() throws Exception {
Optional.ofNullable(blockPremiumNames).ifPresent(builder::setBlockPremiumNames);
Optional.ofNullable(contactsRequireSyncing).ifPresent(builder::setContactsRequireSyncing);
Optional.ofNullable(registryLockAllowed).ifPresent(builder::setRegistryLockAllowed);
Optional.ofNullable(expiryAccessPeriodEnabled)
.ifPresent(builder::setExpiryAccessPeriodEnabled);
Optional.ofNullable(phonePasscode).ifPresent(builder::setPhonePasscode);
Optional.ofNullable(icannReferralEmail).ifPresent(builder::setIcannReferralEmail);
Optional.ofNullable(whoisServer).ifPresent(builder::setWhoisServer);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ void testSuccess() throws Exception {
assertThat(registrar.getLastUpdateTime()).isEqualTo(registrar.getCreationTime());
assertThat(registrar.getBlockPremiumNames()).isFalse();
assertThat(registrar.isRegistryLockAllowed()).isFalse();
assertThat(registrar.getExpiryAccessPeriodEnabled()).isFalse();
assertThat(registrar.getPoNumber()).isEmpty();
assertThat(registrar.getIcannReferralEmail()).isEqualTo("foo@bar.test");

Expand Down Expand Up @@ -890,6 +891,50 @@ void testSuccess_registryLockDisallowed() throws Exception {
assertThat(registrar.get().isRegistryLockAllowed()).isFalse();
}

@Test
void testSuccess_expiryAccessPeriodEnabled() throws Exception {
runCommandForced(
"--name=blobio",
"--password=some_password",
"--registrar_type=REAL",
"--iana_id=8",
"--expiry_access_period_enabled=true",
"--passcode=01234",
"--icann_referral_email=foo@bar.test",
"--street=\"123 Fake St\"",
"--city Fakington",
"--state MA",
"--zip 00351",
"--cc US",
"clientz");

Optional<Registrar> registrar = Registrar.loadByRegistrarId("clientz");
assertThat(registrar).isPresent();
assertThat(registrar.get().getExpiryAccessPeriodEnabled()).isTrue();
}

@Test
void testSuccess_expiryAccessPeriodDisabled() throws Exception {
runCommandForced(
"--name=blobio",
"--password=some_password",
"--registrar_type=REAL",
"--iana_id=8",
"--expiry_access_period_enabled=false",
"--passcode=01234",
"--icann_referral_email=foo@bar.test",
"--street=\"123 Fake St\"",
"--city Fakington",
"--state MA",
"--zip 00351",
"--cc US",
"clientz");

Optional<Registrar> registrar = Registrar.loadByRegistrarId("clientz");
assertThat(registrar).isPresent();
assertThat(registrar.get().getExpiryAccessPeriodEnabled()).isFalse();
}

@Test
void testFailure_badPhoneNumber() {
ParameterException thrown =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -563,20 +563,37 @@ void testSuccess_disallowRegistryLock() throws Exception {
assertThat(loadRegistrar("NewRegistrar").isRegistryLockAllowed()).isFalse();
}

@Test
void testSuccess_expiryAccessPeriodEnabled() throws Exception {
assertThat(loadRegistrar("NewRegistrar").getExpiryAccessPeriodEnabled()).isFalse();
runCommandForced("--expiry_access_period_enabled=true", "NewRegistrar");
assertThat(loadRegistrar("NewRegistrar").getExpiryAccessPeriodEnabled()).isTrue();
}

@Test
void testSuccess_resetExpiryAccessPeriodEnabled() throws Exception {
persistResource(
loadRegistrar("NewRegistrar").asBuilder().setExpiryAccessPeriodEnabled(true).build());
runCommandForced("--expiry_access_period_enabled=false", "NewRegistrar");
assertThat(loadRegistrar("NewRegistrar").getExpiryAccessPeriodEnabled()).isFalse();
}

@Test
void testSuccess_unspecifiedBooleansArentChanged() throws Exception {
persistResource(
loadRegistrar("NewRegistrar")
.asBuilder()
.setBlockPremiumNames(true)
.setContactsRequireSyncing(true)
.setExpiryAccessPeriodEnabled(true)
.build());
// Make some unrelated change where we don't specify the flags for the booleans.
runCommandForced("NewRegistrar");
// Make sure that the boolean fields didn't get reset back to false.
Registrar reloadedRegistrar = loadRegistrar("NewRegistrar");
assertThat(reloadedRegistrar.getBlockPremiumNames()).isTrue();
assertThat(reloadedRegistrar.getContactsRequireSyncing()).isTrue();
assertThat(reloadedRegistrar.getExpiryAccessPeriodEnabled()).isTrue();
}

@Test
Expand Down
6 changes: 3 additions & 3 deletions db/src/main/resources/sql/er_diagram/brief_er_diagram.html
Original file line number Diff line number Diff line change
Expand Up @@ -261,19 +261,19 @@ <h2>System Information</h2>
</tr>
<tr>
<td class="property_name">generated on</td>
<td class="property_value">2026-08-12 15:34:00</td>
<td class="property_value">2026-08-27 21:08:38</td>
</tr>
<tr>
<td class="property_name">last flyway file</td>
<td id="lastFlywayFile" class="property_value">V228__hosthistory_repo_id_mod_time_idx.sql</td>
<td id="lastFlywayFile" class="property_value">V230__registrar_drop_xap_enabled_default.sql</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>
<svg viewBox="0.00 0.00 4783.00 3613.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="erDiagram" style="overflow: hidden; width: 100%; height: 800px">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 3608.5)">
<title>SchemaCrawler_Diagram</title> <polygon fill="white" stroke="none" points="-4,4 -4,-3608.5 4778.75,-3608.5 4778.75,4 -4,4" /> <text xml:space="preserve" text-anchor="start" x="4535.5" y="-29.2" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text> <text xml:space="preserve" text-anchor="start" x="4618.25" y="-29.2" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 17.12.2</text> <text xml:space="preserve" text-anchor="start" x="4534.75" y="-9.45" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text> <text xml:space="preserve" text-anchor="start" x="4618.25" y="-9.45" font-family="Helvetica,sans-Serif" font-size="14.00">2026-08-12 15:34:00</text> <polygon fill="none" stroke="#888888" points="4531.75,-4 4531.75,-45.5 4766.75,-45.5 4766.75,-4 4531.75,-4" /> <!-- allocationtoken_a08ccbef -->
<title>SchemaCrawler_Diagram</title> <polygon fill="white" stroke="none" points="-4,4 -4,-3608.5 4778.75,-3608.5 4778.75,4 -4,4" /> <text xml:space="preserve" text-anchor="start" x="4535.5" y="-29.2" font-family="Helvetica,sans-Serif" font-size="14.00">generated by</text> <text xml:space="preserve" text-anchor="start" x="4618.25" y="-29.2" font-family="Helvetica,sans-Serif" font-size="14.00">SchemaCrawler 17.12.2</text> <text xml:space="preserve" text-anchor="start" x="4534.75" y="-9.45" font-family="Helvetica,sans-Serif" font-size="14.00">generated on</text> <text xml:space="preserve" text-anchor="start" x="4618.25" y="-9.45" font-family="Helvetica,sans-Serif" font-size="14.00">2026-08-27 21:08:38</text> <polygon fill="none" stroke="#888888" points="4531.75,-4 4531.75,-45.5 4766.75,-45.5 4766.75,-4 4531.75,-4" /> <!-- allocationtoken_a08ccbef -->
<g id="node1" class="node">
<title>allocationtoken_a08ccbef</title> <polygon fill="#e9c2f2" stroke="none" points="479.25,-1014.62 479.25,-1034.38 664.25,-1034.38 664.25,-1014.62 479.25,-1014.62" /> <text xml:space="preserve" text-anchor="start" x="481.25" y="-1020.08" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">public."AllocationToken"</text> <polygon fill="#e9c2f2" stroke="none" points="664.25,-1014.62 664.25,-1034.38 737.25,-1034.38 737.25,-1014.62 664.25,-1014.62" /> <text xml:space="preserve" text-anchor="start" x="698.5" y="-1019.08" font-family="Helvetica,sans-Serif" font-size="14.00">[table]</text> <text xml:space="preserve" text-anchor="start" x="481.25" y="-1000.33" font-family="Helvetica,sans-Serif" font-weight="bold" font-style="italic" font-size="14.00">token</text> <text xml:space="preserve" text-anchor="start" x="658.5" y="-999.33" font-family="Helvetica,sans-Serif" font-size="14.00"> </text> <text xml:space="preserve" text-anchor="start" x="666.25" y="-999.33" font-family="Helvetica,sans-Serif" font-size="14.00">text not null</text> <text xml:space="preserve" text-anchor="start" x="481.25" y="-979.58" font-family="Helvetica,sans-Serif" font-size="14.00">domain_name</text> <text xml:space="preserve" text-anchor="start" x="658.5" y="-979.58" font-family="Helvetica,sans-Serif" font-size="14.00"> </text> <text xml:space="preserve" text-anchor="start" x="666.25" y="-979.58" font-family="Helvetica,sans-Serif" font-size="14.00">text</text> <text xml:space="preserve" text-anchor="start" x="481.25" y="-959.83" font-family="Helvetica,sans-Serif" font-size="14.00">redemption_domain_repo_id</text> <text xml:space="preserve" text-anchor="start" x="658.5" y="-959.83" font-family="Helvetica,sans-Serif" font-size="14.00"> </text> <text xml:space="preserve" text-anchor="start" x="666.25" y="-959.83" font-family="Helvetica,sans-Serif" font-size="14.00">text</text> <text xml:space="preserve" text-anchor="start" x="481.25" y="-940.08" font-family="Helvetica,sans-Serif" font-size="14.00">token_type</text> <text xml:space="preserve" text-anchor="start" x="658.5" y="-940.08" font-family="Helvetica,sans-Serif" font-size="14.00"> </text> <text xml:space="preserve" text-anchor="start" x="666.25" y="-940.08" font-family="Helvetica,sans-Serif" font-size="14.00">text</text> <polygon fill="none" stroke="#888888" points="478.25,-934.62 478.25,-1035.38 738.25,-1035.38 738.25,-934.62 478.25,-934.62" />
</g>
Expand Down
Loading
Loading