Hello, I use channels in couchbase as a form of access control in a shared document system. Generally, users have access to multiple channels and documents belong to only 1 channel. One issue I have not been able to solve is when I remove a channel from a user, I want all of the documents in that channel to be removed from the user’s device.
I think the current behavior of CBL is that when I remove a channel from a user’s admin_channels, that user doesn’t receive any further updates on documents in that channel, but the previously synced documents remain on the user’s device. In my scenario, I also need to “revoke” access to the already synced documents in that channel.
Is there a way to purge local documents when a user’s admin_channels are updated?