couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [03/50] documentation commit: updated refs/heads/import-master to fe7f7bf
Date Thu, 10 Jul 2014 09:47:02 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/da348c90
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/tree/da348c90
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-documentation/diff/da348c90

Branch: refs/heads/import-master
Commit: da348c905c869aff1557209ac6986d989840223e
Parents: 2023ccb
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/da348c90/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