Permalink
Browse files

COUCHDB-1502 - Allow user to delete own _users doc

  • Loading branch information...
1 parent 3bbb261 commit f0d6f19bc83206720df6e2eea43f378cace5b969 @rnewson rnewson committed Jun 23, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/couchdb/couch_users_db.erl
@@ -104,5 +104,7 @@ after_doc_read(Doc, #db{user_ctx = UserCtx} = Db) ->
throw(not_found)
end.
-get_doc_name(#doc{body={Body}}) ->
- couch_util:get_value(?NAME, Body).
+get_doc_name(#doc{id= <<"org.couchdb.user:", Name/binary>>}) ->
+ Name;
+get_doc_name(_) ->
+ undefined.

0 comments on commit f0d6f19

Please sign in to comment.