mrvnknns_39360
02/28/2024, 10:02 PMlistRelationshipsForResource(
resourceType,
parentSubjectType,
parentSubjectId,
parentRelation
);
With resourceType "documents" and parentRelation "parent_organization". In the schema, every document has a parent_organization relation
The second call is a lookupResources call for the subject/user, which would fetch all resources that user has access to (with some filters you can specify ofcourse). With those two sets, you can then compute the subset of documents that the user has access to, which are also owned by that organization. There are some obvious scaling issues here, but we limit # of docs per org etc. so it hasn't been a huge problem