Restrict deleting documents

Hi Team,

I am using pouchdb with sync gateway to sync documents from Couchbase to the browser.

Using pouchdb inspector the user can make changes to these documents.

So, my question is, is there a way that we can stop user from modifying the document via pouchdb inspector?

Also, even if the user modifies the document via pouchdb inspector, is there a way that I can stop this updated document to be synced back to the Couchbase server?

Please let me know your thoughts on this.


Ajinkya Udgirkar

I don’t know anything about PouchDB inspector (and how you’d prevent updates to the local database), but you would use the Sync Function on the Sync Gateway side to enforce write restrictions: