Opened 5 months ago

Closed 5 months ago

Last modified 5 months 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 Changed 5 months ago by Tim Graham

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

comment:3 Changed 5 months ago by Tim Graham <timograham@…>

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 Changed 5 months ago by Tim Graham <timograham@…>

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