It can be quite useful in a few cases to avoid hard-coded names or roles in validate_doc_update functions.
I have update the wiki with this information. Thanks for the info, Marcello 2011/9/20 Alexander Shorin <[email protected]>: > Hi! > > Yes this is database security object and this argument was added with > 0.11.1 release. For Javascript missing secObj is not critical, but for > others it could produce a lot of happy debugging hours, because it had > been nowhere officially described(: > > -- > ,,,^..^,,, > > > > On Tue, Sep 20, 2011 at 4:47 PM, Marcello Nuccio > <[email protected]> wrote: >> Looking at the source code[1], I understand that `validate_doc_update` >> functions are called with four arguments, instead of three as >> documented on the wiki[2] and the "Definitive Guide"[3]. >> >> If I understand it correctly, the fourth argument is the security >> object of the database. Is it correct?. It's OK for you if I update >> the wiki[2] with this information? >> >> Thanks, >> Marcello >> >> [1]: >> https://github.com/apache/couchdb/blob/trunk/src/couchdb/couch_query_servers.erl#L225 >> [2]: http://wiki.apache.org/couchdb/Document_Update_Validation >> [3]: http://guide.couchdb.org/draft/validation.html >> >
