NIHVIVO-736 Use redirectToLoginPage() in VitroHttpRequest instead of implementing it again here.
This commit is contained in:
parent
674b2e1222
commit
0bd050a78b
1 changed files with 2 additions and 10 deletions
|
@ -39,7 +39,7 @@ public class FakeSelfEditController extends VitroHttpServlet {
|
|||
HttpSession session = request.getSession();
|
||||
|
||||
if (!isAuthorized(session)) {
|
||||
sendToLogin(vreq, response);
|
||||
redirectToLoginPage(request, response);
|
||||
} else if (vreq.getParameter("force") != null) {
|
||||
startFaking(vreq, response);
|
||||
} else if (vreq.getParameter("stopfaking") != null) {
|
||||
|
@ -59,14 +59,6 @@ public class FakeSelfEditController extends VitroHttpServlet {
|
|||
return isAdmin || isFakingAlready;
|
||||
}
|
||||
|
||||
private void sendToLogin(VitroRequest vreq, HttpServletResponse response)
|
||||
throws IOException {
|
||||
HttpSession session = vreq.getSession();
|
||||
session.setAttribute("postLoginRequest", vreq.getRequestURI());
|
||||
response.sendRedirect(vreq.getContextPath() + Controllers.LOGIN
|
||||
+ "?login=block");
|
||||
}
|
||||
|
||||
private void startFaking(VitroRequest vreq, HttpServletResponse response)
|
||||
throws IOException {
|
||||
HttpSession session = vreq.getSession();
|
||||
|
|
Loading…
Add table
Reference in a new issue