couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Couchdb Wiki] Update of "Document_Update_Validation" by RussellBranca
Date Wed, 23 Jan 2013 23:11:05 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Couchdb Wiki" for change notification.

The "Document_Update_Validation" page has been changed by RussellBranca:
http://wiki.apache.org/couchdb/Document_Update_Validation?action=diff&rev1=8&rev2=9

Comment:
Update validate_doc_update documentation to explicitly list allowable error types

    a. name - String user name
    a. roles - Array of roles to which user belongs. Currently only admin role is supported.
   1. secObj - The security object of the database (introduced in CouchDB-0.11.1).
+ 
+ == Error Formats ==
+ 
+ Thrown errors must be javascript objects with a key of either "forbidden" or "unauthorized,"
and a value with the error message:
+ 
+ {{{
+ throw({forbidden: 'Error message here.'});
+ }}}
+ or
+ {{{
+ throw({unauthorized: 'Error message here.'});
+ }}}
  
  == Toolbox ==
  Some of these functions are found in http://guide.couchdb.org/draft/validation.html . Use
them inside your validate_doc_update functions.

Mime
View raw message