Skip to content
Permalink
Browse files
Fix metadata not showing issue
  • Loading branch information
isururanawaka committed Oct 19, 2021
1 parent 1d3fbe7 commit 17c2ea87dbca1409d696f0c238a4f91d8069133e
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 17c2ea8

Please sign in to comment.