summaryrefslogtreecommitdiff
path: root/src/couchdb
diff options
context:
space:
mode:
authorJohn Christopher Anderson <jchris@apache.org>2010-02-03 17:29:46 +0000
committerJohn Christopher Anderson <jchris@apache.org>2010-02-03 17:29:46 +0000
commit4ffdb2666447e78714f03b54d31ede6a01eb16d5 (patch)
tree1441aed29c3a3d237b80931ce237a08cf0d58ce9 /src/couchdb
parent6bebee4e85ba211212a9ed3b270077f050214911 (diff)
error message on bad security object
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@906140 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/couchdb')
-rw-r--r--src/couchdb/couch_db.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/couchdb/couch_db.erl b/src/couchdb/couch_db.erl
index aee3bf95..39ce6a9b 100644
--- a/src/couchdb/couch_db.erl
+++ b/src/couchdb/couch_db.erl
@@ -294,7 +294,9 @@ get_security(#db{security=SecProps}) ->
set_security(#db{security=SecProps, update_pid=Pid}=Db, {SecObjProps}) when is_list(SecObjProps) ->
check_is_admin(Db),
SecProps2 = update_sec_field(sec_obj, SecProps, {SecObjProps}),
- gen_server:call(Pid, {set_security, SecProps2}, infinity).
+ gen_server:call(Pid, {set_security, SecProps2}, infinity);
+set_security(_, _) ->
+ throw(bad_request).
update_sec_field(Field, SecProps, Value) ->
Admins = proplists:get_value(admins, SecProps, {[]}),