提交 448da56a 编写于 作者: sq3536's avatar sq3536

给前端的resourceid过滤

上级 6c211dcf
...@@ -26,6 +26,10 @@ public class AppController { ...@@ -26,6 +26,10 @@ public class AppController {
@Value("${r'${ibiz.enablePermissionValid:false}'}") @Value("${r'${ibiz.enablePermissionValid:false}'}")
boolean enablePermissionValid; //是否开启权限校验 boolean enablePermissionValid; //是否开启权限校验
@Value("${r'${'}"ibiz.systemid:${sys.getName()}'}")
private String systemId;
@Autowired @Autowired
private AuthenticationUserService userDetailsService; private AuthenticationUserService userDetailsService;
...@@ -42,10 +46,10 @@ public class AppController { ...@@ -42,10 +46,10 @@ public class AppController {
while(it.hasNext()) { while(it.hasNext()) {
GrantedAuthority authority = (GrantedAuthority)it.next(); GrantedAuthority authority = (GrantedAuthority)it.next();
String strAuthority=authority.getAuthority(); String strAuthority=authority.getAuthority();
if(strAuthority.startsWith("UNIRES")) if(strAuthority.startsWith("UNIRES_"+systemId))
uniRes.add(strAuthority); uniRes.add(strAuthority.substring(systemId.length()+8));
else if(strAuthority.startsWith("APPMENU")) else if(strAuthority.startsWith("APPMENU_"+systemId))
appMenu.add(strAuthority); appMenu.add(strAuthority.substring(systemId.length()+9));
} }
} }
appData.put("unires",uniRes); appData.put("unires",uniRes);
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册