Channel() function not tagging docs

Hi Andy,

I am too facing the same issue. Steps I did are

  1. Created a user “U” in Sync Gateway, with admin_channel “X” .
  2. Created a document “D” having channels property set to “X”.
    {
    "_id": “D”,
    “channels”: “X”,
    “message”: “We’re having winter”,
    “temperature”: “4”
    }
  3. I have not changed sync function so it must be using Default Channel function
    function (doc) {
    channel(doc.channels);
    }
  4. Now when I try to read the same document with Authorization for the above user
    but getting forbidden status code.
    Request
    http://localhost:4984/sync_gateway/X
    Authorization Basic Base64encode(username:password)
    Response
    {
    “error”: “Forbidden”
    “reason”: “forbidden”
    }

Please let me know if I am doing anything wrong.