couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <rnew...@apache.org>
Subject Re: git commit: COUCHDB-1502 - Allow user to delete own _users doc
Date Sat, 23 Jun 2012 16:43:22 GMT

The name is not in the doc for a delete.

B.


On 23 Jun 2012, at 16:41, Benoit Chesneau wrote:

> i still doesn't understand this patch. Why using the name in the doc isn't
> enough? Why do you want to delete a deleted doc according the ticket?
> 
> benoƮt
> 
> On Saturday, June 23, 2012, Robert Newson wrote:
> 
>> nope.
>> 
>> On 23 Jun 2012, at 16:27, Jan Lehnardt wrote:
>> 
>>> 
>>> On Jun 23, 2012, at 14:15 , rnewson@apache.org <javascript:;> wrote:
>>> 
>>>> Updated Branches:
>>>> refs/heads/master 3bbb26127 -> f0d6f19bc
>>>> 
>>>> 
>>>> COUCHDB-1502 - Allow user to delete own _users doc
>>> 
>>> Didn't we have a test for that?!
>>> (probably my fault)
>>> 
>>> 
>>>> 
>>>> 
>>>> 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 <javascript:;>>
>>>> Authored: Sat Jun 23 12:08:06 2012 +0100
>>>> Committer: Robert Newson <rnewson@apache.org <javascript:;>>
>>>> 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