feat: (feature/REQ-2595) 菜单权限查询,处理用户只有免授权权限但是没有查询到父节点的问题
This commit is contained in:
parent
037e466c73
commit
6238ff81d6
@ -787,7 +787,14 @@ public class PermissionQueryServiceImpl implements PermissionQueryService {
|
||||
//免授权
|
||||
Set<Long> authFreeFeatureIds = allFeatureResources.stream()
|
||||
.filter(e -> BooleanUtils.isTrue(e.isNotAuth()))
|
||||
.map(SaasFeatureResourceService.SaasFeatureResourceCache::getFeatureId)
|
||||
.flatMap(e -> {
|
||||
Set<Long> parentIds = e.getParentIds();
|
||||
if (CollectionUtils.isEmpty(parentIds)) {
|
||||
return Sets.newHashSet(e.getFeatureId()).stream();
|
||||
}
|
||||
parentIds.add(e.getFeatureId());
|
||||
return parentIds.stream();
|
||||
})
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
Set<Long> allFeatureIds = allFeatureResources.stream()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user