[Django] #29414: Inlines with no edit permission should still allow users to add new objects

3 views
Skip to first unread message

Django

unread,
May 17, 2018, 10:09:50 PM5/17/18
to django-...@googlegroups.com
#29414: Inlines with no edit permission should still allow users to add new objects
-----------------------------------------+--------------------------
Reporter: Paulo | Owner: Paulo
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: 2.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+--------------------------
I think a regression was introduced in
https://github.com/django/django/pull/6734/files#diff-
43474443052641e2941ca9fd04138c6bR247
where it overrides self.readonly_fields with all fields if the inline has
no edit permission.

This results in a strange form:

[[Image(https://preview.ibb.co/hYd1Dy/django_inline.png)]]

--
Ticket URL: <https://code.djangoproject.com/ticket/29414>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
May 17, 2018, 10:15:02 PM5/17/18
to django-...@googlegroups.com
#29414: Inlines with no edit permission should still allow users to add new objects
-------------------------------+--------------------------------------

Reporter: Paulo | Owner: Paulo
Type: Uncategorized | Status: assigned
Component: Uncategorized | Version: 2.0
Severity: Normal | Resolution:

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Paulo):

PR: https://github.com/django/django/pull/9963

--
Ticket URL: <https://code.djangoproject.com/ticket/29414#comment:1>

Django

unread,
May 18, 2018, 7:27:51 PM5/18/18
to django-...@googlegroups.com
#29414: Inlines with no edit permission should still allow users to add new objects
-------------------------------------+-------------------------------------
Reporter: Paulo | Owner: Paulo
Type: Bug | Status: assigned
Component: contrib.admin | Version: 2.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* severity: Normal => Release blocker
* component: Uncategorized => contrib.admin
* version: 2.0 => 2.1
* has_patch: 0 => 1
* type: Uncategorized => Bug
* stage: Unreviewed => Ready for checkin


Comment:

[https://github.com/django/django/pull/9963 PR]

--
Ticket URL: <https://code.djangoproject.com/ticket/29414#comment:2>

Django

unread,
May 18, 2018, 7:51:19 PM5/18/18
to django-...@googlegroups.com
#29414: Inlines with no edit permission should still allow users to add new objects
-------------------------------------+-------------------------------------
Reporter: Paulo | Owner: Paulo
Type: Bug | Status: closed
Component: contrib.admin | Version: 2.1
Severity: Release blocker | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"ffb72a95bcd6fc5cce7915f3b3732a05837f29a2" ffb72a9]:
{{{
#!CommitTicketReference repository=""
revision="ffb72a95bcd6fc5cce7915f3b3732a05837f29a2"
Fixed #29414 -- Restored form inputs on admin inlines when the user
doesn't have the change permission.

Regression in 825f0beda804e48e9197fcf3b0d909f9f548aa47.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29414#comment:3>

Django

unread,
May 18, 2018, 10:52:13 PM5/18/18
to django-...@googlegroups.com
#29414: Inlines with no edit permission should still allow users to add new objects
-------------------------------------+-------------------------------------
Reporter: Paulo | Owner: Paulo

Type: Bug | Status: closed
Component: contrib.admin | Version: 2.1
Severity: Release blocker | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"6cce05589d3b520e6092ca82a8af183c4ed43741" 6cce055]:
{{{
#!CommitTicketReference repository=""
revision="6cce05589d3b520e6092ca82a8af183c4ed43741"
[2.1.x] Fixed #29414 -- Restored form inputs on admin inlines when the


user doesn't have the change permission.

Regression in 825f0beda804e48e9197fcf3b0d909f9f548aa47.
Backport of ffb72a95bcd6fc5cce7915f3b3732a05837f29a2 from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/29414#comment:4>

Reply all
Reply to author
Forward
0 new messages