This is an automated email from the ASF dual-hosted git repository.

weiraowang pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git


The following commit(s) were added to refs/heads/dev by this push:
     new dc503b0e00 [Fix-15072][Resource Center] Non-admin user can not query 
resource recursively (#15097)
dc503b0e00 is described below

commit dc503b0e00dd0b25f810e5b8dd3496a1efa1fede
Author: Aaron Wang <[email protected]>
AuthorDate: Thu Nov 2 13:34:30 2023 +0800

    [Fix-15072][Resource Center] Non-admin user can not query resource 
recursively (#15097)
---
 .../dolphinscheduler/api/service/impl/ResourcesServiceImpl.java   | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java
 
b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java
index b4a9bba80e..d06829bc7e 100644
--- 
a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java
+++ 
b/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 {
                 if (StringUtils.isBlank(fullName)) {
-                    resourcesList = 
storageOperate.listFilesStatus(defaultPath, defaultPath, tenantCode, type);
-                } else {
-                    resourcesList = storageOperate.listFilesStatus(fullName, 
defaultPath, tenantCode, type);
+                    fullName = defaultPath;
                 }
+                resourcesList = recursive ? 
storageOperate.listFilesStatusRecursively(fullName, defaultPath,
+                        tenantCode, type)
+                        : storageOperate.listFilesStatus(fullName, defaultPath,
+                                tenantCode, type);
             } catch (Exception e) {
                 log.error(e.getMessage() + " Resource path: {}", fullName, e);
                 throw new ServiceException(String.format(e.getMessage() +

Reply via email to