| Line 40... |
Line 40... |
| 40 |
import org.apache.poi.ss.usermodel.Sheet;
|
40 |
import org.apache.poi.ss.usermodel.Sheet;
|
| 41 |
import org.apache.poi.ss.usermodel.Workbook;
|
41 |
import org.apache.poi.ss.usermodel.Workbook;
|
| 42 |
import org.apache.poi.ss.util.CellRangeAddress;
|
42 |
import org.apache.poi.ss.util.CellRangeAddress;
|
| 43 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
43 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
| 44 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
44 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
| - |
|
45 |
import org.apache.struts2.convention.annotation.Result;
|
| - |
|
46 |
import org.apache.struts2.convention.annotation.Results;
|
| 45 |
import org.apache.struts2.interceptor.ServletRequestAware;
|
47 |
import org.apache.struts2.interceptor.ServletRequestAware;
|
| 46 |
import org.apache.struts2.interceptor.ServletResponseAware;
|
48 |
import org.apache.struts2.interceptor.ServletResponseAware;
|
| 47 |
import org.apache.struts2.util.ServletContextAware;
|
49 |
import org.apache.struts2.util.ServletContextAware;
|
| 48 |
import org.apache.thrift.TException;
|
50 |
import org.apache.thrift.TException;
|
| 49 |
import org.slf4j.Logger;
|
51 |
import org.slf4j.Logger;
|
| Line 51... |
Line 53... |
| 51 |
|
53 |
|
| 52 |
@InterceptorRefs({
|
54 |
@InterceptorRefs({
|
| 53 |
@InterceptorRef("defaultStack"),
|
55 |
@InterceptorRef("defaultStack"),
|
| 54 |
@InterceptorRef("login")
|
56 |
@InterceptorRef("login")
|
| 55 |
})
|
57 |
})
|
| - |
|
58 |
@Results({
|
| - |
|
59 |
@Result(name="authfail", type="redirectAction", params = {"actionName" , "reports"})
|
| 56 |
|
60 |
})
|
| 57 |
public class UserOrdersController implements ServletRequestAware, ServletResponseAware, ServletContextAware {
|
61 |
public class UserOrdersController implements ServletRequestAware, ServletResponseAware, ServletContextAware {
|
| 58 |
|
62 |
|
| 59 |
private static Logger logger = LoggerFactory.getLogger(UserOrdersController.class);
|
63 |
private static Logger logger = LoggerFactory.getLogger(UserOrdersController.class);
|
| 60 |
|
64 |
|
| 61 |
private HttpServletRequest request;
|
65 |
private HttpServletRequest request;
|
| Line 67... |
Line 71... |
| 67 |
|
71 |
|
| 68 |
private String errorMsg = "";
|
72 |
private String errorMsg = "";
|
| 69 |
|
73 |
|
| 70 |
public String index() {
|
74 |
public String index() {
|
| 71 |
if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getServletPath())) {
|
75 |
if(!ReportsUtils.canAccessReport((Long)session.getAttribute(ReportsUtils.ROLE), request.getServletPath())) {
|
| 72 |
return "exception";
|
76 |
return "authfail";
|
| 73 |
}
|
77 |
}
|
| 74 |
return "report";
|
78 |
return "report";
|
| 75 |
}
|
79 |
}
|
| 76 |
|
80 |
|
| 77 |
// Handles the POST request (Form Submission)
|
81 |
// Handles the POST request (Form Submission)
|