I'm trying to implement document-level access control.
My initial instinct is to simply add an attribute to the document (i.e. "access") and make it a list that I can keep appending users to (i.e. ["user1", "user2", "user3"]).
I can then use the sync gateway to make the document id a channel, then give all the users in the "access" attribute access to the channel.
Is this the best way. I'm just concerned that the "access" list is going to get very big with a lot of users.
Is there a smarter way?
slim