thanks for the link, My confusion is actually related to the scenario i am trying to simulate:
- i have channels named by userIDs i have two documents one profile and "responseQuestionnaire". Only the "owner" of the document (recognized by an key "idclient" ) can access and sync with it, an example is below. - How do i Enforce this rule in sync config, knowing that I don't really have "accounts with passwords etc" and i put "guest enabled" in the "users" part of the JSON sync config. - if it's the case, do I need to create an account(admin console) for each user opening my app and updating/syncing data in it?(I don't have a predefined set of users). - snippet from config file: - if (doc.type == "ReponseQuestionnaire") { // give user access to his survey Answers - var user = doc.idClient.substring(doc.idClient.indexOf(":")+1); access(user, "survey-" + user); // add doc to user's channel channel("reponseQuestionnaire- " + user); requireUser(user); } "users": { "GUEST": { "disabled": false, "admin_channels": ["*"]} }, Le vendredi 13 mars 2015 16:37:23 UTC, Adam Fraser a écrit : > > Have you reviewed the documentation for authorizing user access? It > provides a good overview of granting users access to channels. > > > http://developer.couchbase.com/mobile/develop/guides/sync-gateway/channels/developing/index.html#authorizing-user-access > > You can make an access() call in your sync function to grant a user access > to a specific channel - it sounds like that's what you want to do in your > case. > > Thanks, > Adam > -- 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 mobile-couchbase+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/mobile-couchbase/efda4825-9a04-4207-8534-fd7e1beedd78%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.