Sync Function and intermediate documents

Hi, I have the following scenario:

I have three entities: A, B and C. A and B have a NxN relation, because entity B is a collection of A documents and A can be in more than one B. To solve this, I have the C entity that makes the relation between A and B by keeping both IDs.

Lets say that an user has access to B and, because of that, he gains access to A. But the only way to know that is by looking at the proper document C, which doesn’t have any information regarding the user ID, in a way that I could give the user access to a channel for document A or put document A on the user’s channel.

Is there a simple way to grant access to the user on this scenario using the sync function?

The typical approach would be to include the user ID on the intersection object ©, and use that to grant the user access to a channel associated with entity A.