#20151: get_deleted_objects does not check permissions on proxy model objects
without ModelAdmin
-------------------------------------+-------------------------------------
Reporter: anonymous | Owner: Jerlo F.
| De Leon
Type: Bug | Status: assigned
Component: contrib.admin | Version: 1.5
Severity: Normal | Resolution:
Keywords: ModelAdmin; | Triage Stage: Accepted
get_deleted_objects; proxy |
Has patch: 1 | Needs documentation: 1
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Jerlo F. De Leon):
I have opened a new PR (https://github.com/django/django/pull/21127) to
address the feedback, as the original PR
(https://github.com/django/django/pull/21058) was closed by the GitHub
Actions bot.
As you suggested, I moved the tests to
tests.admin_views.test_actions.AdminActionsTest. The new test case now
verifies that deleting a Persona (registered) is blocked when the user
lacks delete permissions for the related FooAccount (not registered),
confirming the expected HTML output and ensuring the deletion does not
occur on POST.
I have also added the .. versionchanged:: documentation to
ref/contrib/admin/index.txt to note the behavior change regarding
permission checks for non-registered models.
--
Ticket URL: <https://code.djangoproject.com/ticket/20151#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/0107019da1707f86-110552bc-d262-46e4-a9ba-58ce3bce368d-000000%40eu-central-1.amazonses.com.