(improvement)(headless) When obtaining the domain list, do not obtain the sub-domain (#1628)

Co-authored-by: lxwcodemonkey
This commit is contained in:
LXW
2024-09-04 21:42:16 +08:00
committed by GitHub
parent 37438e7731
commit 5eb0a7a5c5

View File

@@ -124,10 +124,7 @@ public class DomainServiceImpl implements DomainService {
domainWithAuth = domainResps.stream()
.filter(domainResp -> checkAdminPermission(orgIds, user, domainResp))
.collect(Collectors.toSet());
List<Long> domainIds = domainWithAuth.stream().map(DomainResp::getId)
.collect(Collectors.toList());
return getDomainChildren(domainIds).stream()
return domainWithAuth.stream()
.peek(domainResp -> domainResp.setHasEditPermission(true))
.collect(Collectors.toSet());
}