| Line 47... |
Line 47... |
| 47 |
import org.apache.poi.ss.usermodel.Sheet;
|
47 |
import org.apache.poi.ss.usermodel.Sheet;
|
| 48 |
import org.apache.poi.ss.usermodel.Workbook;
|
48 |
import org.apache.poi.ss.usermodel.Workbook;
|
| 49 |
import org.apache.poi.ss.util.CellRangeAddress;
|
49 |
import org.apache.poi.ss.util.CellRangeAddress;
|
| 50 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
50 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
| 51 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
51 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
| - |
|
52 |
import org.apache.struts2.convention.annotation.Result;
|
| - |
|
53 |
import org.apache.struts2.convention.annotation.Results;
|
| 52 |
import org.apache.struts2.interceptor.ServletRequestAware;
|
54 |
import org.apache.struts2.interceptor.ServletRequestAware;
|
| 53 |
import org.apache.struts2.interceptor.ServletResponseAware;
|
55 |
import org.apache.struts2.interceptor.ServletResponseAware;
|
| 54 |
import org.apache.thrift.TException;
|
56 |
import org.apache.thrift.TException;
|
| 55 |
import org.slf4j.Logger;
|
57 |
import org.slf4j.Logger;
|
| 56 |
import org.slf4j.LoggerFactory;
|
58 |
import org.slf4j.LoggerFactory;
|
| Line 64... |
Line 66... |
| 64 |
*/
|
66 |
*/
|
| 65 |
@InterceptorRefs({
|
67 |
@InterceptorRefs({
|
| 66 |
@InterceptorRef("defaultStack"),
|
68 |
@InterceptorRef("defaultStack"),
|
| 67 |
@InterceptorRef("login")
|
69 |
@InterceptorRef("login")
|
| 68 |
})
|
70 |
})
|
| - |
|
71 |
@Results({
|
| - |
|
72 |
@Result(name="authfail", type="redirectAction", params = {"actionName" , "reports"})
|
| - |
|
73 |
})
|
| 69 |
public class AffiliateController implements ServletRequestAware, ServletResponseAware{
|
74 |
public class AffiliateController implements ServletRequestAware, ServletResponseAware{
|
| 70 |
|
75 |
|
| 71 |
private static Logger log = LoggerFactory.getLogger(AffiliateController.class);
|
76 |
private static Logger log = LoggerFactory.getLogger(AffiliateController.class);
|
| 72 |
|
77 |
|
| 73 |
private HttpServletResponse response;
|
78 |
private HttpServletResponse response;
|
| Line 94... |
Line 99... |
| 94 |
log.info(request.getServletPath());
|
99 |
log.info(request.getServletPath());
|
| 95 |
if (!ReportsUtils.canAccessReport(
|
100 |
if (!ReportsUtils.canAccessReport(
|
| 96 |
(Long) session.getAttribute(ReportsUtils.ROLE),
|
101 |
(Long) session.getAttribute(ReportsUtils.ROLE),
|
| 97 |
request.getServletPath()))
|
102 |
request.getServletPath()))
|
| 98 |
{
|
103 |
{
|
| 99 |
return "exception";
|
104 |
return "authfail";
|
| 100 |
}
|
105 |
}
|
| 101 |
try {
|
106 |
try {
|
| 102 |
UserClient userContextServiceClient = new UserClient();
|
107 |
UserClient userContextServiceClient = new UserClient();
|
| 103 |
Client userClient = userContextServiceClient.getClient();
|
108 |
Client userClient = userContextServiceClient.getClient();
|
| 104 |
masterAffiliates = userClient.getAllMasterAffiliates();
|
109 |
masterAffiliates = userClient.getAllMasterAffiliates();
|