菜单树添加权限过滤

This commit is contained in:
houwei 2024-06-27 08:55:14 +08:00
parent 46237c74c0
commit 324df9a288

View File

@ -88,9 +88,8 @@ public class SysMenuServiceImpl implements SysMenuService {
for (SysMenuVo child : node.getChildren()) {
Integer needAuthorityId = child.getAuthorityId();
if (needAuthorityId == null) {
// 如果在则递归处理子节点的子节点
//如果菜单没有权限设置则该菜单不需要过滤
filterTreeByPermissions(child, permissions);
// 将子节点添加到筛选后的子节点列表中
filteredChildren.add(child);
}else{
// 检查子节点的权限是否在权限列表中