I went through this document, but unable to remove document access on the sync gateway.
FYI: I'm using Couchbase Lite 2.8.6 on the mobile (Xamarin SDK)
Document
{
"channels": [
"3a7c15ba2241"
],
"docType": "logentry",
"creator": "14bd9d1d7a",
"createdOn": "2022-03-30T13:37:42.5070600-04:00",
"subjectId": "14bd9d1d7a",
"modifier": "14bd9d1d7a",
"modifiedOn": "2022-03-30T13:37:42.5070600-04:00",
"deleter": null,
"writers": [
"14bd9d1d7a",
"7c15ba2241"
],
"sequenceId": "0",
"_id": "evt..14bd9d1d7a..69856d73a",
"_rev": null,
"_deleted": false,
"insert_id": "evt..14bd9d1d7a..69856d73a",
"device_id": "5E634E1C226",
"user_id": "14bd9d1d7a",
"event_type": "Signup",
"origin": null,
"time": 1648661795504
}
Sync function
if (doc.docType === "logentry") {
channel("logevents");
return;
}
I expected that by doing this in sync gateway, the channel is updated and the user doesn't have the access to logentry
channel so the document will be purged. But I still see the documents in the device (phone) CB Lite. Based on the documentation, an event is triggered and those documents are purged, which isn't happening.
Can anyone suggest how I can remove document access and subsequently purges the document from the database?