Browse Source

[Fix-15072][Resource Center] Non-admin user can not query resource recursively (#15097)

3.2.1-prepare
Aaron Wang 1 year ago committed by GitHub
parent
commit
dc503b0e00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java

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

@ -612,10 +612,12 @@ public class ResourcesServiceImpl extends BaseServiceImpl implements ResourcesSe
try { try {
if (StringUtils.isBlank(fullName)) { if (StringUtils.isBlank(fullName)) {
resourcesList = storageOperate.listFilesStatus(defaultPath, defaultPath, tenantCode, type); fullName = defaultPath;
} else {
resourcesList = storageOperate.listFilesStatus(fullName, defaultPath, tenantCode, type);
} }
resourcesList = recursive ? storageOperate.listFilesStatusRecursively(fullName, defaultPath,
tenantCode, type)
: storageOperate.listFilesStatus(fullName, defaultPath,
tenantCode, type);
} catch (Exception e) { } catch (Exception e) {
log.error(e.getMessage() + " Resource path: {}", fullName, e); log.error(e.getMessage() + " Resource path: {}", fullName, e);
throw new ServiceException(String.format(e.getMessage() + throw new ServiceException(String.format(e.getMessage() +

Loading…
Cancel
Save