(improvement)(Headless) Fix model list auth checking (#883)

* (improvement)(Headless) Fix model list auth check

* (improvement)(Headless) Fix row permission

---------

Co-authored-by: jolunoluo
This commit is contained in:
LXW
2024-04-03 20:36:49 +08:00
committed by GitHub
parent ff56fd1e46
commit 6b60bfe6bc
3 changed files with 12 additions and 7 deletions

View File

@@ -306,11 +306,16 @@ public class ModelServiceImpl implements ModelService {
List<Long> domainIds = domainService.getDomainAuthSet(user, authType)
.stream().map(DomainResp::getId)
.collect(Collectors.toList());
if (domainIds.contains(domainId)) {
domainIds = Lists.newArrayList(domainId);
} else {
if (CollectionUtils.isEmpty(domainIds)) {
return Lists.newArrayList();
}
if (domainId != null) {
if (domainIds.contains(domainId)) {
domainIds = Lists.newArrayList(domainId);
} else {
return Lists.newArrayList();
}
}
ModelFilter modelFilter = new ModelFilter();
modelFilter.setIncludesDetail(false);
modelFilter.setDomainIds(domainIds);