Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#29414 closed Bug (fixed)

Inlines with no edit permission should still allow users to add new objects

Reported by: Paulo Owned by: Paulo
Component: contrib.admin Version: 2.1
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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:

https://preview.ibb.co/hYd1Dy/django_inline.png

Change History (4)

comment:2 by Tim Graham, 7 years ago

Component: Uncategorizedcontrib.admin
Has patch: set
Severity: NormalRelease blocker
Triage Stage: UnreviewedReady for checkin
Type: UncategorizedBug
Version: 2.02.1

comment:3 by Tim Graham <timograham@…>, 7 years ago

Resolution: fixed
Status: assignedclosed

In ffb72a9:

Fixed #29414 -- Restored form inputs on admin inlines when the user doesn't have the change permission.

Regression in 825f0beda804e48e9197fcf3b0d909f9f548aa47.

comment:4 by Tim Graham <timograham@…>, 7 years ago

In 6cce055:

[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

Note: See TracTickets for help on using tickets.
Back to Top