1
0
mirror of https://github.com/google/nomulus synced 2026-01-05 04:56:03 +00:00

Add simple registry-lock-verification page (#2499)

This is a fairly simple page that solely exists to display the result
from the action, and to link the user back to the domain list.
This commit is contained in:
gbrodman
2024-07-23 15:04:35 -04:00
committed by GitHub
parent 35ff768176
commit 233ee09efe
11 changed files with 152 additions and 3 deletions

View File

@@ -343,7 +343,7 @@ public final class DomainLockUtils {
.orElseThrow(
() ->
new IllegalArgumentException(
String.format("Invalid verification code %s", verificationCode)));
String.format("Invalid verification code \"%s\"", verificationCode)));
}
private void applyLockStatuses(RegistryLock lock, DateTime lockTime, boolean isAdmin) {

View File

@@ -161,7 +161,7 @@ public abstract class ConsoleApiAction implements Runnable {
Map<String, Object> registrarDiffMap = registrar.toDiffableFieldMap();
Stream.of("passwordHash", "salt") // fields to remove from final diff
.forEach(fieldToBeRemoved -> registrarDiffMap.remove(fieldToBeRemoved));
.forEach(registrarDiffMap::remove);
// Use LinkedHashMap here to preserve ordering; null values mean we can't use ImmutableMap.
LinkedHashMap<String, Object> result = new LinkedHashMap<>(registrarDiffMap);

View File

@@ -156,7 +156,7 @@ public class ConsoleRegistryLockVerifyActionTest {
action.run();
assertThat(response.getStatus()).isEqualTo(HttpServletResponse.SC_BAD_REQUEST);
assertThat(response.getPayload())
.isEqualTo("Invalid verification code 123456789ABCDEFGHJKLMNPQRSTUUUUU");
.isEqualTo("Invalid verification code \"123456789ABCDEFGHJKLMNPQRSTUUUUU\"");
assertThat(loadByEntity(defaultDomain).getStatusValues()).containsExactly(StatusValue.INACTIVE);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB