couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject git commit: COUCHDB-1502 - Allow user to delete own _users doc
Date Sat, 23 Jun 2012 12:15:39 GMT
Updated Branches:
  refs/heads/master 3bbb26127 -> f0d6f19bc


COUCHDB-1502 - Allow user to delete own _users doc


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/f0d6f19b
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/f0d6f19b
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/f0d6f19b

Branch: refs/heads/master
Commit: f0d6f19bc83206720df6e2eea43f378cace5b969
Parents: 3bbb261
Author: Robert Newson <rnewson@apache.org>
Authored: Sat Jun 23 12:08:06 2012 +0100
Committer: Robert Newson <rnewson@apache.org>
Committed: Sat Jun 23 12:46:14 2012 +0100

----------------------------------------------------------------------
 src/couchdb/couch_users_db.erl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/f0d6f19b/src/couchdb/couch_users_db.erl
----------------------------------------------------------------------
diff --git a/src/couchdb/couch_users_db.erl b/src/couchdb/couch_users_db.erl
index 6735fb6..de76142 100644
--- a/src/couchdb/couch_users_db.erl
+++ b/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.


Mime
View raw message