Skip to content
Permalink
Browse files
Bug fix in resource fetching
  • Loading branch information
isururanawaka committed Sep 9, 2021
1 parent 79a7c6e commit 8d9a82c7f273ff5efa1868582e91660d64935e98
Showing 1 changed file with 2 additions and 1 deletion.
@@ -83,7 +83,8 @@ public void fetchResource(ResourceFetchRequest request, StreamObserver<ResourceF

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 (cg:Group)-[:CHILD_OF*]->(g:Group)<-[:MEMBER_OF]-(u)" +
" OPTIONAL MATCH (g:Group)<-[:MEMBER_OF]-(u) " +
" OPTIONAL MATCH (cg:Group)-[:CHILD_OF]->(g)" +
" 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";

0 comments on commit 8d9a82c

Please sign in to comment.