I have a graph with multiple ways of reaching an end-vertice from the start-vertice and what I'm trying to achive is to only return those vertices visited by traversing ALL outbound edges of a user's role.
Details:
The user has N roles where each role is connected to different hierarchical subjects.
Articles are published to the same hiearchical subjects.
Search: A user has access to an article if the user has a role where ALL the user's subjects are in the articles published subjects. Where a subject is a tree structure meaning that articles published higher up in a hierarchy matches users connected lower in the subject hierarchy.
FOR role IN OUTBOUND "users/bob" has
//Here I want to define
//$count = how many outbound edges 'definedAs' from 'role'
FOR type IN OUTBOUND role definedAs
FOR supertype IN 0..100 INBOUND type validFor //Subject hiearchy
FOR article IN INBOUND supertype published
//Only include 'article' that have been visited >= $count
return article
Is this possible in ArangoDB?