I have a set of documents that can have various privacy settings around them:
- They can be completed public (any registered user) can view them
- They can be viewable only by people following you (this "Followers" array is stored in each User's document)
- They can be private to the person who published the document as well.
- They can have custom privacy which allows you to name individual users who can view the document. In addition, you can allow groups of users to also view the document (e.g. there could be a group called "Sample Group" which has 20 users in it. You could allow said group to view the tile.)
I am lost as to how to implement a schema for this efficiently in MongoDB and would love some insight into best practices for implementing this schema.