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/09/09 19:42:46 UTC
[airavata-data-lake] branch master updated: Bug fix in resource
fetch permission inheritance through parent entity
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 859c873 Bug fix in resource fetch permission inheritance through parent entity
new 58590f3 Merge pull request #66 from isururanawaka/sharing_service_impl
859c873 is described below
commit 859c873955e9ae3d34cd559be1ace8723918ce11
Author: Isuru Ranawaka <ir...@gmail.com>
AuthorDate: Thu Sep 9 15:42:05 2021 -0400
Bug fix in resource fetch permission inheritance through parent entity
---
.../apache/airavata/drms/api/handlers/ResourceServiceHandler.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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 a628ba8..87b3ea0 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
@@ -83,10 +83,12 @@ public class ResourceServiceHandler extends ResourceServiceGrpc.ResourceServiceI
String query = " MATCH (u:User), (r" + type + ") where u.username = $username AND u.tenantId = $tenantId AND " +
" r.entityId = $entityId AND r.tenantId = $tenantId" +
- " OPTIONAL MATCH (g:Group)<-[:MEMBER_OF]-(u) " +
+ " OPTIONAL MATCH (g:Group)<-[:MEMBER_OF]-(u) " +
" OPTIONAL MATCH (cg:Group)-[:CHILD_OF]->(g)" +
+ " OPTIONAL MATCH (r)-[:CHILD_OF*]->(x:COLLECTION)" +
" return case when exists((u)<-[:SHARED_WITH]-(r)) OR exists((g)<-[:SHARED_WITH]-(r)) OR " +
- "exists((cg)<-[:SHARED_WITH]-(r)) then r else NULL end as value";
+ "exists((cg)<-[:SHARED_WITH]-(r)) OR exists((u)<-[:SHARED_WITH]-(x)) OR exists((g)<-[:SHARED_WITH]-(x)) OR exists((cg)<-[:SHARED_WITH]-(x))" +
+ "then r else NULL end as value";
logger.debug("Fetch resource query {}", query);