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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user