mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-13 21:17:08 +00:00
(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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user