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 StephaneAlnet
Date Tue, 08 Mar 2011 13:34:07 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 StephaneAlnet.
The comment on this change is: Added the DELETE case for completeness..
http://wiki.apache.org/couchdb/Document_Update_Validation?action=diff&rev1=3&rev2=4

--------------------------------------------------

  
    /* Usage */
    if(oldDoc) {
+     if(newDoc._deleted) {
+       user_match(newDoc.account,"You are not authorized to delete this document");
+     } else {
-     unchanged("account");
+       unchanged("account");
-     user_match(newDoc.account,"You are not authorized to modify this document");
+       user_match(newDoc.account,"You are not authorized to modify this document");
+     }
    } else {
      user_match(newDoc.account,"You are not authorized to create this document");
    }

Mime
View raw message