You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by is...@apache.org on 2021/08/12 20:51:46 UTC

[airavata-data-lake] branch master updated: bug fix in search resource for shared resources

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

isjarana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-data-lake.git


The following commit(s) were added to refs/heads/master by this push:
     new 53a9e3b  bug fix in search resource for shared resources
     new ce94795  Merge pull request #41 from isururanawaka/sharing_service_impl
53a9e3b is described below

commit 53a9e3b473406033e8c5fe9b301bcfb3056ebf56
Author: Isuru Ranawaka <ir...@gmail.com>
AuthorDate: Thu Aug 12 16:50:35 2021 -0400

    bug fix in search resource for shared resources
---
 .../apache/airavata/drms/api/handlers/ResourceServiceHandler.java   | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/data-resource-management-service/drms-api/src/main/java/org/apache/airavata/drms/api/handlers/ResourceServiceHandler.java b/data-resource-management-service/drms-api/src/main/java/org/apache/airavata/drms/api/handlers/ResourceServiceHandler.java
index e91d1c2..0b47f99 100644
--- a/data-resource-management-service/drms-api/src/main/java/org/apache/airavata/drms/api/handlers/ResourceServiceHandler.java
+++ b/data-resource-management-service/drms-api/src/main/java/org/apache/airavata/drms/api/handlers/ResourceServiceHandler.java
@@ -528,10 +528,14 @@ public class ResourceServiceHandler extends ResourceServiceGrpc.ResourceServiceI
                                 " OPTIONAL MATCH (g:Group)<-[:MEMBER_OF]-(u) " +
                                 " OPTIONAL MATCH (s:Storage{entityId:'" + storageId + "'})<-[:CHILD_OF]-(r:" + value + ")-[relR:SHARED_WITH]->(u)" +
                                 " OPTIONAL MATCH (sp:Storage{entityId:'" + storageId + "'})<-[:CHILD_OF]-(rg:" + value + ")-[relRG:SHARED_WITH]->(g)" +
-                                " return distinct   r,relR, rg, relRG ";
+                                " OPTIONAL MATCH (s2:Storage{entityId:'" + storageId +"'})<-[:CHILD_OF*]-(r2:" + value + ")-[relR2:SHARED_WITH]->(u) where NOT r2.owner=$username"+
+                                " OPTIONAL MATCH (s3:Storage{entityId:'" + storageId + "'})<-[:CHILD_OF*]-(r3:" + value + ")-[relR3:SHARED_WITH]->(u) where NOT r3.owner=$username"+
+                                " return distinct   r,relR, rg,relRG, r2,relR2, r3,relR3 ";
                         keyList = new ArrayList();
                         keyList.add("r:relR");
                         keyList.add("rg:relRG");
+                        keyList.add("r2:relR2");
+                        keyList.add("r3:relR3");
                     }
 
                 } else {