show protected profile after password change
This commit is contained in:
parent
694d20e4b7
commit
ffa11c0e58
@ -108,6 +108,8 @@ public class ProfileServlet extends AbstractLDAPServlet {
|
|||||||
usersDAO.update(usr);
|
usersDAO.update(usr);
|
||||||
httpSession.setAttribute("successmessage", messages.getString("ProfileServlet.password_changed"));
|
httpSession.setAttribute("successmessage", messages.getString("ProfileServlet.password_changed"));
|
||||||
httpSession.setAttribute("operation", "profile");
|
httpSession.setAttribute("operation", "profile");
|
||||||
|
httpSession.setAttribute("formdisabled", "disabled");
|
||||||
|
httpSession.setAttribute("iddisabled", "disabled");
|
||||||
httpSession.setAttribute("user", usr);
|
httpSession.setAttribute("user", usr);
|
||||||
req.getRequestDispatcher("/user.jsp").forward(req, resp);
|
req.getRequestDispatcher("/user.jsp").forward(req, resp);
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,6 @@ public class ResetPasswordServlet extends AbstractLDAPServlet {
|
|||||||
final UsersDAO usrDAO = new UsersDAO(ldapSession);
|
final UsersDAO usrDAO = new UsersDAO(ldapSession);
|
||||||
final String loginParam = req.getParameter("login");
|
final String loginParam = req.getParameter("login");
|
||||||
final User sessUsr = (User) httpSession.getAttribute("user");
|
final User sessUsr = (User) httpSession.getAttribute("user");
|
||||||
// final MailboxDAO hsMailboxDAO = new MailboxDAO(getTicketProvider());
|
|
||||||
if (loginParam != null && sessUsr != null && loginParam.equals(sessUsr.getLogin())) {
|
if (loginParam != null && sessUsr != null && loginParam.equals(sessUsr.getLogin())) {
|
||||||
final String password1 = req.getParameter("password");
|
final String password1 = req.getParameter("password");
|
||||||
final String password2 = req.getParameter("password2");
|
final String password2 = req.getParameter("password2");
|
||||||
@ -110,7 +109,11 @@ public class ResetPasswordServlet extends AbstractLDAPServlet {
|
|||||||
sessUsr.setAndValidatePassword(password1);
|
sessUsr.setAndValidatePassword(password1);
|
||||||
usrDAO.update(sessUsr);
|
usrDAO.update(sessUsr);
|
||||||
httpSession.setAttribute("successmessage", messages.getString("ResetPasswordServlet.password_changed"));
|
httpSession.setAttribute("successmessage", messages.getString("ResetPasswordServlet.password_changed"));
|
||||||
req.getRequestDispatcher("/new-password.jsp").forward(req, resp);
|
httpSession.setAttribute("operation", "profile");
|
||||||
|
httpSession.setAttribute("formdisabled", "disabled");
|
||||||
|
httpSession.setAttribute("iddisabled", "disabled");
|
||||||
|
httpSession.setAttribute("user", sessUsr);
|
||||||
|
req.getRequestDispatcher("/user.jsp").forward(req, resp);
|
||||||
return;
|
return;
|
||||||
} catch (SimplePasswordException e) {
|
} catch (SimplePasswordException e) {
|
||||||
httpSession.setAttribute("user", sessUsr);
|
httpSession.setAttribute("user", sessUsr);
|
||||||
|
Loading…
Reference in New Issue
Block a user