Skip to content
Permalink
Browse files
Merge pull request #80 from isururanawaka/master
Fix metadata not showing issue
  • Loading branch information
isururanawaka committed Oct 19, 2021
2 parents 1d3fbe7 + 17c2ea8 commit 62254f515e10af47d2138bd6f19de0d59f0dcc35
Showing 1 changed file with 4 additions and 2 deletions.
@@ -999,7 +999,8 @@ private boolean hasAccessForResource(String username, String tenantId, String re

String query = " MATCH (u:User), (r) 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)" +
" OPTIONAL MATCH (l)<-[:CHILD_OF*]-(r)" +
" return case when exists((u)<-[:SHARED_WITH]-(r)) OR exists((u)<-[:SHARED_WITH]-(l)) OR exists((g)<-[:SHARED_WITH]-(r)) OR " +
" exists((g)<-[:SHARED_WITH]-(l)) OR exists((cg)<-[:SHARED_WITH]-(r)) OR exists((cg)<-[:SHARED_WITH]-(l)) then r else NULL end as value";
@@ -1023,7 +1024,8 @@ private boolean hasAccessForResource(String username, String tenantId, String re

String query = " MATCH (u:User), (r) 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)" +
" OPTIONAL MATCH (l:" + parentType + ")<-[:CHILD_OF*]-(r)" +
" return case when exists((u)<-[:SHARED_WITH]-(r)) OR exists((u)<-[:SHARED_WITH]-(l)) OR exists((g)<-[:SHARED_WITH]-(r)) OR " +
" exists((g)<-[:SHARED_WITH]-(l)) OR exists((cg)<-[:SHARED_WITH]-(r)) OR exists((cg)<-[:SHARED_WITH]-(l)) then r else NULL end as value";

0 comments on commit 62254f5

Please sign in to comment.