===========================Django 2.1.15 release notes===========================*December 2, 2019*Django 2.1.15 fixes a security issue and a data loss bug in 2.1.14.CVE-2019-19118: Privilege escalation in the Django admin.=========================================================Since Django 2.1, a Django model admin displaying a parent model with relatedmodel inlines, where the user has view-only permissions to a parent model butedit permissions to the inline model, would display a read-only view of theparent model but editable forms for the inline.Submitting these forms would not allow direct edits to the parent model, butwould trigger the parent model's ``save()`` method, and cause pre and post-savesignal handlers to be invoked. This is a privilege escalation as a user wholacks permission to edit a model should not be able to trigger its save-relatedsignals.To resolve this issue, the permission handling code of the Django admininterface has been changed. Now, if a user has only the "view" permission for aparent model, the entire displayed form will not be editable, even if the userhas permission to edit models included in inlines.This is a backwards-incompatible change, and the Django security team is awarethat some users of Django were depending on the ability to allow editing ofinlines in the admin form of an otherwise view-only parent model.Given the complexity of the Django admin, and in-particular the permissionsrelated checks, it is the view of the Django security team that this change wasnecessary: that it is not currently feasible to maintain the existing behaviorwhile escaping the potential privilege escalation in a way that would avoid arecurrence of similar issues in the future, and that would be compatible withDjango's *safe by default* philosophy.For the time being, developers whose applications are affected by this changeshould replace the use of inlines in read-only parents with custom forms andviews that explicitly implement the desired functionality. In the longer term,adding a documented, supported, and properly-tested mechanism forpartially-editable multi-model forms to the admin interface may occur in Djangoitself.Bugfixes========* Fixed a data loss possibility in the:meth:`~django.db.models.query.QuerySet.select_for_update()`. When using``'self'`` in the ``of`` argument with :ref:`multi-table inheritance<multi-table-inheritance>`, a parent model was locked instead of thequeryset's model (:ticket:`30953`).