How to prevent all data from being synchronized to CBLite if no channels are specified in the replication


#1

I have a Sync Gateway setup that channelizes data for users. The way I read the documentation (http://developer.couchbase.com/documentation/mobile/1.2/develop/guides/sync-gateway/channels/developing/index.html) is that if a channel is not provided in the replication setup, all data is pulled. Is there any way to prevent replication of all data in that case short of having to create individual users for each channel? The client, which uses Couchbase Lite, is occasionally making posts against the _changes endpoint that don’t have any channel filter, and as a safety measure we would like to disable the default behavior of replicating all the data. Any ideas?


#2

That’s correct - if a channel filter is not specified for the replication, all channels that the user has access to will be replicated.

You’ll only replicate ‘all the data’ if the user has been granted access to the * channel - otherwise the user will only see what they’ve been granted access to via channels.


#3

I was just making sure there wasn’t anything I had missed. Thanks for confirming.