www in docker support
This commit is contained in:
parent
539a848e95
commit
c227fce036
2145 changed files with 399596 additions and 58 deletions
|
|
@ -0,0 +1,62 @@
|
|||
package it.acxent.anag.servlet;
|
||||
|
||||
import it.acxent.anag.Postazione;
|
||||
import it.acxent.common.Users;
|
||||
import it.acxent.servlet.LogonSvlt;
|
||||
import javax.servlet.annotation.WebServlet;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@WebServlet(urlPatterns = {"/admin/menu/Menu.abl"})
|
||||
public class MenuSvlt extends LogonSvlt {
|
||||
protected boolean checkLoginProfile(HttpServletRequest req) {
|
||||
try {
|
||||
if (getLoginUser(req) == null) {
|
||||
forceJspPage(getLoginPage(null, null), req);
|
||||
return true;
|
||||
}
|
||||
if (getLoginUser(req).getFlgValido().equals("N")) {
|
||||
forceJspPage(super.getLoginPage(null, null), req);
|
||||
req.getSession().removeAttribute("loginUser_id");
|
||||
req.getSession().removeAttribute("utenteLogon");
|
||||
return false;
|
||||
}
|
||||
if (getLoginUser(req).getId_userProfile() > 0L) {
|
||||
forceJspPage(super.getLoginPage(null, null), req);
|
||||
return true;
|
||||
}
|
||||
forceJspPage(super.getLoginPage(null, null), req);
|
||||
req.getSession().removeAttribute("loginUser_id");
|
||||
req.getSession().removeAttribute("utenteLogon");
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
handleDebug(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
protected String getLoginPage(HttpServletRequest req, HttpServletResponse res) {
|
||||
return super.getLoginPage(req, res);
|
||||
}
|
||||
|
||||
protected Users getUser(HttpServletRequest req) {
|
||||
return new it.acxent.anag.Users(getApFull(req));
|
||||
}
|
||||
|
||||
protected long checkLoginName(HttpServletRequest req, HttpServletResponse res) {
|
||||
long result = super.checkLoginName(req, res);
|
||||
if (result == 5L) {
|
||||
String ip = req.getRemoteHost();
|
||||
Postazione pos = new Postazione(getApFull(req));
|
||||
pos.findByIp(ip);
|
||||
it.acxent.anag.Users bean = (it.acxent.anag.Users)getLoginUser(req);
|
||||
System.out.println("LOGIN EFFETTUATO: user:" + bean.getLogin() + " ip:" + ip);
|
||||
if (pos.getDBState() == 1) {
|
||||
bean.setId_postazione(pos.getId_postazione());
|
||||
req.getSession().setAttribute("utenteLogon", bean);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue