1
0
mirror of https://github.com/google/nomulus synced 2026-01-03 11:45:39 +00:00

Add FE for password-reset verification (#2795)

Tested locally and on alpha with dummy values (and throwing an
exception).

I was able to reuse a bit of code from the EPP password reset, but not
all of it.
This commit is contained in:
gbrodman
2025-08-18 23:00:44 -04:00
committed by GitHub
parent a61a667992
commit 4738b979e4
13 changed files with 362 additions and 149 deletions

View File

@@ -63,6 +63,7 @@ public class PasswordResetVerifyAction extends ConsoleApiAction {
// Temporary flag when testing email sending etc
if (!user.getUserRoles().isAdmin()) {
setFailedResponse("", HttpServletResponse.SC_FORBIDDEN);
return;
}
PasswordResetRequest request = tm().transact(() -> loadAndValidateResetRequest(user));
ImmutableMap<String, ?> result =
@@ -76,6 +77,7 @@ public class PasswordResetVerifyAction extends ConsoleApiAction {
// Temporary flag when testing email sending etc
if (!user.getUserRoles().isAdmin()) {
setFailedResponse("", HttpServletResponse.SC_FORBIDDEN);
return;
}
checkArgument(!Strings.isNullOrEmpty(newPassword.orElse(null)), "Password must be provided");
tm().transact(