0
votes

Currently, my app uses the server side to create and get documents. I'm thinking of replicating the database so the app would get documents locally but will still create documents via the server.

For that, I need to make sure the credentials I give to the user (app) will allow him/her to replicate ONLY from couchdb to the app and not the opposite. I don't want the user to be able to write himself/herself directly in his/her database for security reasons and because I limit his/her write access based on the plan he/she paid for.

Reader role doesn't seem to allow replication and replication role seems to allow the user to be able to write. Is there a way to do what I need?

1

1 Answers

2
votes

This question has been answered before - see here.

In short, you need a validate_doc_update() function in a design document to prevent the user writing to the database.