Merge branch 'RED-7297-A' into 'main'
RED-7297: error message when resetting password See merge request fforesight/tenant-user-management-service!14
This commit is contained in:
commit
b2bc62694c
@ -132,7 +132,7 @@ public class UserService {
|
||||
try {
|
||||
this.getTenantUsersResource().get(userId).executeActionsEmail(Collections.singletonList("UPDATE_PASSWORD"), 86400);
|
||||
} catch (Exception e) {
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Failed to send email", e);
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Failed to send email.", e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -445,12 +445,12 @@ public class UserService {
|
||||
|
||||
try {
|
||||
CredentialRepresentation request = new CredentialRepresentation();
|
||||
request.setType("password");
|
||||
request.setType(CredentialRepresentation.PASSWORD);
|
||||
request.setTemporary(resetPasswordRequest.isTemporary());
|
||||
request.setValue(resetPasswordRequest.getPassword());
|
||||
realmService.realm(TenantContext.getTenantId()).users().get(userId).resetPassword(request);
|
||||
} catch (Exception e) {
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Failed to send email", e);
|
||||
throw new ResponseStatusException(HttpStatus.BAD_REQUEST, "Could not reset password. Please check your input.", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user