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

appnav bug

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