Add a validate_doc_update function to any design document in that database (or create a new one) and test for the _admin role before allowing an update. Ensure that your single user is not an admin then any attempted writes will be rejected. If you cannot create admins, then use a custom role (e.g, 'writer') and ensure your read-only user is not assigned that role.
Alternatively you could just have a single admin user (so that you are not in 'admin party mode') and set require_valid_user to false. Everyone can then read but only the admin can write. For hosted solutions like IrisCouch or Cloudant, you may not be able to set ths value, so the first solution is the safest. B. On 10 October 2011 22:04, Luis Carlos Junges <[email protected]> wrote: > i just need a user with single read access to couchdb database and that does > not have write permission to any document. > > from couch wiki: > > database readers - Defined per database. They can read all types of > documents from the DB, and they can *write (and edit*) documents to the DB > except for design documents. > > >> Is your CouchDB service on a server with a routable address? > using iriscouch.com for tests now. > >>What do you mean by "password"? On CouchDB? > yes. A password on couchdb database as a reader. > > > > On Mon, Oct 10, 2011 at 3:36 PM, Aurélien Bénel <[email protected]>wrote: > >> Hi Luis, >> >> > i already put a password to access the database, which is located at a >> different machine from my server. BUt obviously it will block the img >> request i made directly to my couchdb server. >> >> What do you mean by "password"? On CouchDB? On a reverse proxy? >> Is it a password to prevent admin commands? edits? reads? >> >> Is your CouchDB service on a server with a routable address? >> >> We need more information to help you... >> >> >> Regards, >> >> Aurélien > > > > > -- > "A realidade de cada lugar e de cada época é uma alucinação coletiva." > > > Bloom, Howard >
