couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Jackson <>
Subject Addition of modify-on-document-write hooks
Date Thu, 09 Sep 2010 10:19:22 GMT
Hi all,

Moving this from the users forum, as it appears what I'm after isn't currently available.
For the security model I with to implement in a production CouchDB cluster, I would like to
be able to force a field to be written to all docs based on the user context. The _update
functionality is not what I am after as it requires the user to actually call it when writing
a document (means security could be got-around by not calling this, and setting the required
field in the passed document to something arbitrary, which would then not get caught by a
validation function), and can't modify a document which is passed to it (as far as I can tell
it can only modify existing documents, or create new ones).

I see this ticket:

which talks about the functionality I am after, but appears to have morphed into what is now

I am willing to implement such functionality, if it already doesn't exist, but wonder if this
would be welcome in the trunk, or if there are killer pitfalls which stop this being possible.
I note that in the discussion on that ticket there is talk of how to deal with multiple such
modify-on-write functions, perhaps this is one area that needs discussion?

In any case, I'll probably implement this for our CouchDB installation, but it would be good
to make it generic and globally useful such that I can contribute it back. I know of a number
of people who would like this functionality...

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message