A document tagged with * is readable by any user

I have user1 created with channel “ch-user1”, now I created a documents with channels: [ “*” ] and tried accessing it using user1 account in the defaultInterface BUT only those documents tagged in “ch-user1” appears not in the “*” channel. But, on the documentation it says A document tagged with * is readable by any user.

Is there something wrong with my setup?


All documents are automatically assigned to the “" channel, but users are not, in your sync function you need to call access(“ch-user1”,"”).

If you’re looking for a channel that all users automatically have access to, then you can use the “!” channel, in this case if you map a document to this channel using channel(["!"]) all users will sync that document.

The semantics of these two channels is captured in this ticket.


1 Like

I think I’m getting it. I should be using the “!” channel. Thanks.

Using the “!” works great, but this should definitely be added in the Sync Gateway docs about channels, because just reading them led me to the same conclusion that @JbalTero originally had.

1 Like

Yup, this should be on the documentation.

FYI, we’re already tracking the docs update here: https://github.com/couchbase/sync_gateway/issues/815