* proxy models with no ModelAdmin (even if the concrete model as an admin
page)
* models with InlineAdmin
--
Ticket URL: <https://code.djangoproject.com/ticket/20151>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
The proxy model issue is somehow related to #11154 -- if proxy permissions
were created we could check them just like any other model.
I'm not sure
[https://github.com/django/django/blob/2b48fcc607010065c0f8107baf669dd41b164f3c/django/contrib/admin/util.py#L121-L124
we should checks for delete permission on objects which model is not
registered to the current admin site]. If we don't why aren't we relying
on `ModelAdmin.has_delete_permission` and do the same with inlines?
The only drawback is that you '''must''' register your model in order to
get deletion permission checks. This should be documented at least.
IMO checks should be made this way:
1. If a `ModelAdmin` has been registered for this model or an
`InlineAdmin` matches the relationship collected it should be used.
2. Else if the model is a proxy attempt '''1.''' with the the model it's
proxying (allow multiple levels of proxying).
3. Else fallback on user has_perm.
--
Ticket URL: <https://code.djangoproject.com/ticket/20151#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/20151#comment:2>