couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [16/50] documentation commit: updated refs/heads/import-master to 0efce91
Date Sat, 26 Apr 2014 19:28:50 GMT
```validate_doc_update``` moved from views to root

Signed-off-by: Alexander Shorin <kxepal@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/commit/146019f5
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/146019f5
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/146019f5

Branch: refs/heads/import-master
Commit: 146019f51b6c2303464e22de00380e2324720f31
Parents: 5a98440
Author: Anthony Ananich <anton.ananich@inpun.com>
Authored: Tue Feb 25 18:17:44 2014 +0200
Committer: Alexander Shorin <kxepal@apache.org>
Committed: Tue Feb 25 20:22:20 2014 +0400

----------------------------------------------------------------------
 src/query-server/javascript.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-documentation/blob/146019f5/src/query-server/javascript.rst
----------------------------------------------------------------------
diff --git a/src/query-server/javascript.rst b/src/query-server/javascript.rst
index 16590d6..386f9c5 100644
--- a/src/query-server/javascript.rst
+++ b/src/query-server/javascript.rst
@@ -273,12 +273,12 @@ The CommonJS module can be added to a design document, like so:
        "views": {
           "lib": {
              "security": "function user_context(userctx, secobj) { ... }"
-          },
-          "validate_doc_update": "function(newdoc, olddoc, userctx, secobj) {
-            user = require('lib/security').user(userctx, secobj);
-            return user.is_admin();
-          }"
+          }
        },
+       "validate_doc_update": "function(newdoc, olddoc, userctx, secobj) {
+          user = require('lib/security').user(userctx, secobj);
+          return user.is_admin();
+       }"
        "_id": "_design/test"
     }
 


Mime
View raw message