Skip to content
Permalink
Browse files
Merge pull request #70 from isururanawaka/sharing_service_impl
Bug fix in resource fetching sharedWithMe
  • Loading branch information
isururanawaka committed Sep 10, 2021
2 parents 11f6c28 + c2c746d commit bb08199d3e99abeee5fdd914dc04d9fb5fb06ce0
Showing 1 changed file with 5 additions and 1 deletion.
@@ -456,11 +456,15 @@ public void searchResource(ResourceSearchRequest
String val = qry.getValue();
String query = "MATCH (u:User) where u.username = $username AND u.tenantId = $tenantId " +
" OPTIONAL MATCH (g:Group)<-[:MEMBER_OF]-(u) " +
" OPTIONAL MATCH (x:" + value + ")-[relR:SHARED_WITH]->(u) where NOT x.owner = '" + val + "'" +
// " OPTIONAL MATCH (u)<-[relRM:SHARED_WITH]-(m)<-[:CHILD_OF*]-(rm:" + value + ") where NOT rm.owner='" + val + "'" +
" OPTIONAL MATCH (r:" + value + ")-[rel:SHARED_WITH]->(u) where NOT r.owner = '" + val + "'" +
" AND NOT (r)-[:CHILD_OF*]->(x) " +
// " OPTIONAL MATCH (g)<-[relRMG:SHARED_WITH]-(mg)<-[:CHILD_OF*]-(rmg:" + value + ") where NOT rmg.owner='" + val + "' " +
" OPTIONAL MATCH (rg:" + value + ")-[relRG:SHARED_WITH]->(g) where NOT rg.owner = '" + val + "'" +
" return distinct r,rel, rg,relRG ";
" OPTIONAL MATCH (rgr:" + value + ")-[relRGR:SHARED_WITH]->(g) where NOT rgr.owner = '" + val + "'" +
" AND NOT (rgr)-[:CHILD_OF*]->(rg) " +
" return distinct r,rel, rgr,relRGR ";
Map<String, Object> objectMap = new HashMap<>();
objectMap.put("username", val);
objectMap.put("tenantId", callUser.getTenantId());

0 comments on commit bb08199

Please sign in to comment.