Ok so I'm sure I'm doing something wrong but for the life of me I can see what. I've been at this for several hours now.
I have created a simple demo app for iOS and configured Sync Gateway on my local network. Login is via facebook and seems to work. I see users created, when I add documents my sync function is creating the channels. BUT, for some reason every user is able to see every document. The last example I tried was logging in a new user on an empty database, so by default they don't have access to any channels (I can see this by viewing their _user: document). If they then create a document and put it in a channel (sync function) in theory at least if I wipe the phone and log them in again that document should not be replicated back to their phone right? This is the post box scenario.
I can't see anyone else reporting a similar issue so I know I'm doing something stupid, any help gratefully appreciated.
Thanks in advance.
---
{
"all_channels": {},
"sequence": 0,
"passwordhash_bcrypt": "JDJhJDEwJE1nNnB3QkxRd081T2pyZXlabGxVZE83ZlBpdVlpak9ROHUvYVlBQWtGa3FManptT1hqcG1L",
"rolesSince": {}
}
and the document "C419BC4A-9ECC-4757-9D97-8F972B8D7559" they created looks like,
{
"_sync": {
"rev": "1-e8212b751869c1df19df7b3b19c5d27e",
"sequence": 2,
"history": {
"revs": [
"1-e8212b751869c1df19df7b3b19c5d27e"
],
"parents": [
-1
],
"bodies": [
""
],
"channels": [
[
]
]
},
"channels": {
},
"time_saved": "2014-11-30T10:16:53.771858451+13:00"
},
"category": "none",
"title": "test-01",
"type": "item"
}