Fixes
This commit is contained in:
parent
39c0be5d99
commit
31b0f5543f
2 changed files with 11 additions and 8 deletions
|
@ -504,7 +504,7 @@ public class AccountService {
|
|||
String passwordConfirm = formData.getFirst("password-confirm");
|
||||
|
||||
if (requireCurrent) {
|
||||
if (Validation.isEmpty(passwordNew)) {
|
||||
if (Validation.isEmpty(password)) {
|
||||
setReferrerOnPage();
|
||||
return account.setError(Messages.MISSING_PASSWORD).createResponse(AccountPages.PASSWORD);
|
||||
}
|
||||
|
@ -516,6 +516,11 @@ public class AccountService {
|
|||
}
|
||||
}
|
||||
|
||||
if (Validation.isEmpty(passwordNew)) {
|
||||
setReferrerOnPage();
|
||||
return account.setError(Messages.MISSING_PASSWORD).createResponse(AccountPages.PASSWORD);
|
||||
}
|
||||
|
||||
if (!passwordNew.equals(passwordConfirm)) {
|
||||
setReferrerOnPage();
|
||||
return account.setError(Messages.INVALID_PASSWORD_CONFIRM).createResponse(AccountPages.PASSWORD);
|
||||
|
@ -690,6 +695,11 @@ public class AccountService {
|
|||
|
||||
public static boolean isPasswordSet(UserModel user) {
|
||||
boolean passwordSet = false;
|
||||
|
||||
if (user.getFederationLink() != null) {
|
||||
passwordSet = true;
|
||||
}
|
||||
|
||||
for (UserCredentialValueModel c : user.getCredentialsDirectly()) {
|
||||
if (c.getType().equals(CredentialRepresentation.PASSWORD)) {
|
||||
passwordSet = true;
|
||||
|
|
|
@ -159,13 +159,6 @@ public class AccountTest {
|
|||
});
|
||||
}
|
||||
|
||||
@Ignore
|
||||
@Test
|
||||
public void forever() throws Exception{
|
||||
while (true) Thread.sleep(5000);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void returnToAppFromQueryParam() {
|
||||
driver.navigate().to(AccountUpdateProfilePage.PATH + "?referrer=test-app");
|
||||
|
|
Loading…
Reference in a new issue