Message from discussion
has_add_permission() isn't working properly
Received: by 10.220.45.202 with SMTP id g10mr1292503vcf.13.1242598519162;
Sun, 17 May 2009 15:15:19 -0700 (PDT)
Return-Path: <kmtra...@gmail.com>
Received: from mail-gx0-f157.google.com (mail-gx0-f157.google.com [209.85.217.157])
by gmr-mx.google.com with ESMTP id 39si284570yxd.16.2009.05.17.15.15.18;
Sun, 17 May 2009 15:15:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of kmtra...@gmail.com designates 209.85.217.157 as permitted sender) client-ip=209.85.217.157;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of kmtra...@gmail.com designates 209.85.217.157 as permitted sender) smtp.mail=kmtra...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by gxk1 with SMTP id 1so5706538gxk.0
for <django-users@googlegroups.com>; Sun, 17 May 2009 15:15:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:in-reply-to:references
:date:message-id:subject:from:to:content-type;
bh=CcATm+c5GTgQ1+STJJu3mglqln/6mZOLfIryR5sfYbc=;
b=bxDyXrHaGIxzGKfQbZrbl/X6EfU2zYtfbgIuFwbRT1782wdU+ByZUwPbBqY+BEix2u
PHIgtNMM43BVdTgLHtGjC76s/RvpCuXBArWqHljdoo3GAvEOCfgdzVsjO6dfecNeGB/1
agsMb2S7QPlQPygv6ZZgstkKUKgXhw+HseSmo=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
b=Bqt6Av3SNF0Az8fc+EqP9fEZI/xXnHEycSWWxMLG67QvLAQ9neJnzZnwEjUZ5p8Fqa
XLF2fUaSyzTLQkRXSm7BmPKBRzgpoZSeRuoC6OfGTXG7cM57cRG8iZyPlxjdwwITBA7w
rTEeZfvOOWv2TjTiGpj7OGeLxkfNtfCiBixj0=
MIME-Version: 1.0
Received: by 10.151.119.4 with SMTP id w4mr11165460ybm.200.1242598518070; Sun,
17 May 2009 15:15:18 -0700 (PDT)
In-Reply-To: <4b2edb14-8a15-4400-808c-1ba30342ec31@t11g2000vbc.googlegroups.com>
References: <3605d8fb0903250446w41fe138u5a49791bd5b64b71@mail.gmail.com>
<3605d8fb0903250515n74f0ab9bs6f50d0e985771e1@mail.gmail.com>
<af3536270903250625g4f25043dq7b40aa90805412c0@mail.gmail.com>
<3605d8fb0903251012x7886765bjcb09ed0a9e8d3...@mail.gmail.com>
<ae6584d30903251014x4ad4d10fx85f38a2e8096c...@mail.gmail.com>
<4b2edb14-8a15-4400-808c-1ba30342e...@t11g2000vbc.googlegroups.com>
Date: Sun, 17 May 2009 18:15:18 -0400
Message-ID: <af3536270905171515u10e03229w90afbdcfb5746...@mail.gmail.com>
Subject: Re: has_add_permission() isn't working properly
From: Karen Tracey <kmtra...@gmail.com>
To: django-users@googlegroups.com
Content-Type: multipart/alternative; boundary=001e680f14c844a17b046a230379
--001e680f14c844a17b046a230379
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
On Sun, May 17, 2009 at 5:34 PM, Sergio A. <sergio.andreo...@gmail.com>wrote:
>
>
> the issue seems not to be totally solved by the patch.
>
> If I have two classes A and B
> class A has a field being a foreign key to a B class field
> in the admin, when I add an A element, I see the '+' button on the
> foreign key field to B even though I do not have the rights to create
> a B element.
> Therefore I see a pop-up with permission denied.
>
> How to fix this?
>
>
That's a slightly different problem, and will need its own ticket. Despite
superficial similarity, hose "add another" links on the add/change pages for
an object are coming from completely different code than the other problem
mentioned in this thread. Specifically, they are added by the
RelatedFieldWidgetWrapper. From a quick look I'm not sure this one is going
to be easy to fix....I don't know that the widget wrapper has the necessary
information to decide whether to include that link. But you could open a
ticket for someone to take a closer look.
Karen
--001e680f14c844a17b046a230379
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Sun, May 17, 2009 at 5:34 PM, Sergio A. <span dir=3D"ltr"><<a href=3D=
"mailto:sergio.andreo...@gmail.com">sergio.andreo...@gmail.com</a>></spa=
n> wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" s=
tyle=3D"border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8e=
x; padding-left: 1ex;">
<br>
<br>
the issue seems not to be totally solved by the patch.<br>
<br>
If I have two classes A and B<br>
class A has a field being a foreign key to a B class field<br>
in the admin, when I add an A element, I see the '+' button on the<=
br>
foreign key field to B even though I do not have the rights to create<br>
a B element.<br>
Therefore I see a pop-up with permission denied.<br>
<br>
How to fix this?<br>
<br>
</blockquote><div><br>That's a slightly different problem, and will nee=
d its own ticket.=A0 Despite superficial similarity, hose "add another=
" links on the add/change pages for an object are coming from complete=
ly different code than the other problem mentioned in this thread.=A0 Speci=
fically, they are added by the RelatedFieldWidgetWrapper.=A0 From a quick l=
ook I'm not sure this one is going to be easy to fix....I don't kno=
w that the widget wrapper has the necessary information to decide whether t=
o include that link.=A0 But you could open a ticket for someone to take a c=
loser look.<br>
<br>Karen<br></div></div>
--001e680f14c844a17b046a230379--