What is the last argument in validation functions in CouchDB?
Here is a validation function signature in CouchDB:
function (newDoc, oldDoc, userCtx, secObj) {}
I wonder what the last 开发者_如何学JAVAargument is.
The wiki documentation for CouchDB's Document Update Validation says this is "The security object of the database (introduced in CouchDB-0.11.1)."
This security object describes what admin/reader privileges have been set on the DB, details about its structure and meaning is given in the wiki's Security Features Overview page.
精彩评论