Skip to content

Commit dc503b0

Browse files
authored
[Fix-15072][Resource Center] Non-admin user can not query resource recursively (#15097)
1 parent d5f99cc commit dc503b0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -612,10 +612,12 @@ private List<StorageEntity> queryStorageEntityList(User loginUser, String fullNa
612612

613613
try {
614614
if (StringUtils.isBlank(fullName)) {
615-
resourcesList = storageOperate.listFilesStatus(defaultPath, defaultPath, tenantCode, type);
616-
} else {
617-
resourcesList = storageOperate.listFilesStatus(fullName, defaultPath, tenantCode, type);
615+
fullName = defaultPath;
618616
}
617+
resourcesList = recursive ? storageOperate.listFilesStatusRecursively(fullName, defaultPath,
618+
tenantCode, type)
619+
: storageOperate.listFilesStatus(fullName, defaultPath,
620+
tenantCode, type);
619621
} catch (Exception e) {
620622
log.error(e.getMessage() + " Resource path: {}", fullName, e);
621623
throw new ServiceException(String.format(e.getMessage() +

0 commit comments

Comments
 (0)