diff options
author | John Christopher Anderson <jchris@apache.org> | 2010-01-13 05:12:21 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2010-01-13 05:12:21 +0000 |
commit | 67b876687796a64580d76f94b540d55fb8f4f4e7 (patch) | |
tree | d4dda2f07827490517200429031101d0f4485385 | |
parent | 07e761ad63e781367778c1324e74e6718d8d54af (diff) |
validate use doc type
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@898651 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/couchdb/couch_httpd_auth.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/couchdb/couch_httpd_auth.erl b/src/couchdb/couch_httpd_auth.erl index 5c87f427..d7b8181f 100644 --- a/src/couchdb/couch_httpd_auth.erl +++ b/src/couchdb/couch_httpd_auth.erl @@ -175,7 +175,7 @@ auth_design_doc(DocId) -> <<"validate_doc_update">>, <<"function(newDoc, oldDoc, userCtx) { if ((oldDoc || newDoc).type != 'user') { - return; + throw({forbidden : 'doc.type must be user'}); } // we only validate user docs for now if (newDoc._deleted === true) { // allow deletes by admins and matching users |