Hi everyone, we are struggling a bit a little bit with finding a suitable channel structure for our project. Here are the requirements:
1) Each user has a profile document (first name, last name, user ID, etc.) Those profile documents are initially accessible by the owner only 2) A user can create a project (represented by a project document that has a name, members, etc.) 3) The owner of the document can invite other users to join the project, in this case the members of the projects get added to the project channel So that works, the users have access to the project file but how would we enable access to each user profile document so that users can see each other's information? It seems easy but its not (for us at least)... Another way to look at it, is the couchbase labs chat app. Instead of having all profile be accessible by everyone, how could we limit exposure by adding the chat profiles into a channel. New members would have to be added via email address... Attempts: 1) We initially thought that we add those profile documents to the project channel but that doesn't work because the profile document is not aware of all the projects the owner has access. The project file has a member array but the profile documents don't. We could maintain a manual configuration within the profile document (for example memberships) but that seems kind of backwards and hard to maintain. 2) Another idea was to have the sync function take care of it but that doesn't work because the sync function works on a document basis - meaning only when a document changes it triggers a change. We cannot update a different document than the one who triggered the change. 3) Being tired of it we thought about just ignoring the fact of protecting the profile account and making them public but then they all get synced to each device...and that doesn't seem to make sense as well if you have a million profiles... Does anyone have any ideas how to accomplish this? Any pointer is much appreciated it. Christoph Again: Project document -> creates project channel with members being able to access Profile documents -> profile channel with owner access How to enable sync for all profile documents of the members in the project. -- You received this message because you are subscribed to the Google Groups "Couchbase Mobile" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/b5256a60-28e5-4f6b-a0e2-88d871de6d5a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
