couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Samuel Newson <>
Subject Re: Enforcing creating documents using an update handler in a CouchApp
Date Thu, 27 Feb 2014 23:12:35 GMT

update handlers and validate_doc_update go hand-in-hand for model validation.

The validate_doc_update enforces your model, the update handler makes it easier on clients
to send valid updates. The update handler is often unnecessary, though.

I say you have it backwards, it’s the validate_doc_update function you want to focus on.


On 27 Feb 2014, at 23:09, Stanley Iriele <> wrote:

> Use a proxy to say no posts and puts matching that.... Or...just don't call
> it. :-) I exclusively use update handlers to update my docs unless I move
> them in bulk
> On Feb 27, 2014 2:46 PM, "Alexander Shorin" <> wrote:
>> How you suppose to deal with replication which stores documents
>> directly without triggering any update handles?
>> --
>> ,,,^..^,,,
>> On Fri, Feb 28, 2014 at 2:40 AM, Pascal Dennerly <> wrote:
>>> Hi,
>>> I've been struggling with how I might lock down PUT and POST to a DB so I
>>> can enforce a model. Now using an update handler would be ideal, but I'm
>>> struggling to find a way of preventing changes to documents directly.
>>> If validation_doc_update had context about the request, I could block any
>>> requests that didn't come through an update handler there.
>>> Does anyone have any ideas how to do this? Am I missing something?
>>> Thanks,
>>> Pascal

View raw message