diff options
-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 |