非体验分支移除对guest用户处理

Raod 3 years ago
parent 9068e531a7
commit add505e4a2

@ -172,28 +172,6 @@ public class TokenFilter implements Filter {
cacheHelper.stringSetExpire(tokenKey, token, 3600); cacheHelper.stringSetExpire(tokenKey, token, 3600);
cacheHelper.stringSetExpire(userKey, gaeaUserJsonStr, 3600); cacheHelper.stringSetExpire(userKey, gaeaUserJsonStr, 3600);
//在线体验版本
if (USER_GUEST.equals(loginName)
&& !uri.endsWith("/dataSet/testTransform")
&& !uri.endsWith("/reportDashboard/getData")
&& !uri.startsWith("/dict")
&& !uri.endsWith("/reportExcel/preview")
) {
//不允许删除
String method = request.getMethod();
if (HttpMethod.POST.name().equalsIgnoreCase(method)
|| HttpMethod.PUT.name().equalsIgnoreCase(method)
|| HttpMethod.DELETE.name().equalsIgnoreCase(method)
|| uri.contains("/reportDashboard/export")
) {
ResponseBean responseBean = ResponseBean.builder().code("50001")
.message("在线体验版本,不允许此操作。请自行下载本地运行").build();
response.setContentType(ContentType.APPLICATION_JSON.getMimeType());
response.getWriter().print(JSONObject.toJSONString(responseBean));
return;
}
}
//执行 //执行
filterChain.doFilter(request, response); filterChain.doFilter(request, response);
} }

Loading…
Cancel
Save