Shared Channel - Read/Write Permissions

We’re building a shared folder feature with Couchbase and using documents to represent both the folders and the files they contain. Our current design links files to a specific folder using a folderId, and we use Couchbase channels to manage read/write access: each folder is assigned to a channel, and users are given access to that channel.

Our goal is to implement a new feature that allows an administrator to temporarily disable the ability for other users to add new files to a specific folder. We want to achieve this without the overhead of removing and re-adding thousands of users from the channel.

What is the most effective way to implement this “temporary read-only” mode for a folder? We’re exploring solutions involving roles, permissions, or other best practices within Couchbase Sync Gateway.

Hi pslite!

this sounds like a lock, not sure if that’s the best way to implement it, but I’d add a field to folders onto which your sync function would look for the id of the user and, if it doesn’t match the ID of the user that made the change, it would refuse to accept it.

Hope this helps. Cheers!