@Test public void shouldChangePasswordTest() throws Exception { sut.setPassword(NEW_PASSWORD); sut.setPasswordRepe(NEW_PASSWORD); user.setPasswordExpired(true); final String result = sut.changePassword(); assertThat(result, is(NavigationResults.CHANGE_PASSWORD_OK)); assertThat(user.isPasswordExpired(), is(false)); }
@Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); } }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }  }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }  @Override String changePassword(); @Override String returnError(Exception ex); }
ExpiredPasswordBean extends AbstractPasswordBean { @Override public String changePassword() { User user = authMgr.getCurrentPrincipal().getUser(); if (user.isLdapAuthentication()) { setPasswordOld(user.getLdapPassword()); } else { setPasswordOld(user.getPassword()); } return super.changePassword(); }  @Override String changePassword(); @Override String returnError(Exception ex);  }