Return-Path: X-Original-To: apmail-couchdb-user-archive@www.apache.org Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 16962D8ED for ; Fri, 22 Jun 2012 16:52:01 +0000 (UTC) Received: (qmail 30185 invoked by uid 500); 22 Jun 2012 16:51:59 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 30145 invoked by uid 500); 22 Jun 2012 16:51:59 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 30137 invoked by uid 99); 22 Jun 2012 16:51:59 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 16:51:59 +0000 Received: from localhost (HELO [192.168.1.5]) (127.0.0.1) (smtp-auth username rnewson, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2012 16:51:59 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1278) Subject: Re: deleting own user account From: Robert Newson In-Reply-To: <37E39896CEE245BDA8E7F389EBA184D7@martynus.net> Date: Fri, 22 Jun 2012 17:51:57 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <32500D2C-FDA0-4E3D-B2BC-A1073436E6E9@apache.org> References: <2A859DFB68514400AC5EC0F756671880@martynus.net> <37E39896CEE245BDA8E7F389EBA184D7@martynus.net> To: user@couchdb.apache.org X-Mailer: Apple Mail (2.1278) I can confirm the behavior. Once I find the code in question I can tell = you if it's intentional, but I don't think it is. In this case, we = should be returning a 4xx telling you that you can't delete yourself, or = allow it. So, if it's intentional, it's quite confusingly implemented. B. On 22 Jun 2012, at 16:35, Gregor Martynus wrote: > Can anybody confirm that when signed in as a user, I cannot DELETE my = own _users doc? It's simple to test in futon.=20 > Is this a feature, or a bug? >=20 > I tested it on couchDB 1.2 myself.=20 >=20 > --=20 > Gregor Martynus >=20 >=20 > On Wednesday, 20. June 2012 at 19:35, Gregor Martynus wrote: >=20 >> Robert, I get a 200 when I GET the same path. When I'm signed in as = "test" in futon and delete my own /_users doc, I get a 404 as well. Is = that not the case for you? >>=20 >> I'm on couchDB 1.2, tested locally and on IrisCouch=20 >>=20 >> --=20 >> Gregor Martynus >>=20 >>=20 >> On Wednesday, 20. June 2012 at 18:45, Robert Newson wrote: >>=20 >>>=20 >>> Do you get a 200 when you GET that same doc id? I suspect you get a = 404. If so, check you have the right id, perhaps you need to escape some = fields. Better, try deleting it from Futon which handles the escaping = for you. >>>=20 >>> If you're deleting an admin user, then you need to modify your .ini = files (preferably via /_config/admins) instead. >>>=20 >>> B. >>>=20 >>> On 20 Jun 2012, at 17:28, Gregor Martynus wrote: >>>=20 >>>> I'm quite sure that this worked before, but doesn't seem to work = anymore.=20 >>>>=20 >>>> Let's say I have a user account "test" and am signed in as "test". >>>> The _rev number of users/org.couchdb.user:test is '1-234' >>>>=20 >>>> Shouldn't I be able to delete my own account with >>>> DELETE /users/org.couchdb.user:test?rev=3D1-234 >>>> ? >>>>=20 >>>> I get a 404 response, but am still signed in as test >>>>=20 >>>> The same happens when I try to PUT the document with _deleted: true = ... >>>>=20 >>>> Any idea?=20 >>>>=20 >>>> --=20 >>>> Gregor >>>>=20 >>>=20 >>>=20 >>>=20 >>>=20 >>=20 >>=20 >=20