mirror of
https://github.com/django/django.git
synced 2025-10-26 23:26:08 +00:00
[1.5.x] Fixed #23431 -- Allowed inline and hidden references to admin fields.
This fixes a regression introduced by the53ff096982security fix. Thanks to @a1tus for the report and Tim for the review. refs #23329. Backport of342ccbdfrom master
This commit is contained in:
@@ -575,11 +575,16 @@ class AdminViewBasicTest(TestCase):
|
||||
response = self.client.get("/test_admin/admin/admin_views/m2mreference/", {TO_FIELD_VAR: 'id'})
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
# Specifying a field that is not refered by any other model directly registered
|
||||
# #23329 - Specifying a field that is not refered by any other model directly registered
|
||||
# to this admin site but registered through inheritance should be allowed.
|
||||
response = self.client.get("/test_admin/admin/admin_views/referencedbyparent/", {TO_FIELD_VAR: 'id'})
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
# #23431 - Specifying a field that is only refered to by a inline of a registered
|
||||
# model should be allowed.
|
||||
response = self.client.get("/test_admin/admin/admin_views/referencedbyinline/", {TO_FIELD_VAR: 'id'})
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
def test_allowed_filtering_15103(self):
|
||||
"""
|
||||
Regressions test for ticket 15103 - filtering on fields defined in a
|
||||
|
||||
Reference in New Issue
Block a user