提交 39c1e474 编写于 作者: sq3536's avatar sq3536

appnav bug

上级 15fe40a8
...@@ -47,16 +47,18 @@ public class SysAppService extends SysAppServiceImpl ...@@ -47,16 +47,18 @@ public class SysAppService extends SysAppServiceImpl
{ {
JSONObject jo=ibzConfigService.getConfig("AppSwitcher",id, userId); JSONObject jo=ibzConfigService.getConfig("AppSwitcher",id, userId);
boolean nullSwitcher=false; boolean nullSwitcher=false;
if(!jo.containsKey("model")) { if(!jo.containsKey("model"))
jo.put("model", new JSONArray()); jo.put("model", new JSONArray());
if(jo.getJSONArray("model").size()==0)
nullSwitcher=true; nullSwitcher=true;
} LinkedHashMap<String,SysApp> apps=uaaCoreService.getApps();
LinkedHashMap<String,SysApp> defApps=uaaCoreService.getApps();
LinkedHashMap<String,SysApp> defApps = new LinkedHashMap<>();
defApps.putAll(apps);
List<SysApp> list=new ArrayList<>(); List<SysApp> list=new ArrayList<>();
JSONArray.parseArray(jo.get("model").toString(),SysApp.class).forEach(sysApp -> { JSONArray.parseArray(jo.get("model").toString(),SysApp.class).forEach(sysApp -> {
SysApp def=defApps.get(sysApp.getId()); SysApp def=defApps.get(sysApp.getId());
if(def==null)return; if(def==null||def.getVisabled()==null||def.getVisabled()==0)return;
if(1!=def.getVisabled())return;
sysApp.setAddr(def.getAddr()); sysApp.setAddr(def.getAddr());
sysApp.setIcon(def.getIcon()); sysApp.setIcon(def.getIcon());
...@@ -67,8 +69,10 @@ public class SysAppService extends SysAppServiceImpl ...@@ -67,8 +69,10 @@ public class SysAppService extends SysAppServiceImpl
defApps.remove(def.getId()); defApps.remove(def.getId());
}); });
final boolean flag=nullSwitcher; final boolean flag=nullSwitcher;
defApps.values().forEach(sysApp -> { defApps.values().forEach(def -> {
if(sysApp.getVisabled()==null||sysApp.getVisabled()==0)return; if(def.getVisabled()==null||def.getVisabled()==0)return;
SysApp sysApp=new SysApp();
CachedBeanCopier.copy(def,sysApp);
if(flag&&id.equalsIgnoreCase("default")) if(flag&&id.equalsIgnoreCase("default"))
sysApp.setVisabled(1); sysApp.setVisabled(1);
else else
......
...@@ -36,6 +36,11 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter { ...@@ -36,6 +36,11 @@ public class AuthorizationTokenFilter extends OncePerRequestFilter {
@Override @Override
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException { protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
if(request.getRequestURI().equals("/uaa/publickey")||request.getRequestURI().indexOf("/uaa/lgoin")>=0){
chain.doFilter(request, response);
return;
}
final String requestHeader = request.getHeader(this.tokenHeader); final String requestHeader = request.getHeader(this.tokenHeader);
String username = null; String username = null;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册