AdminSite app_index does work it doesn't need to
|Reported by:||Keryn Knight <django@…>||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
If a user doesn't have permissions to a module (as defined by it's app label), the way the app_index works, it will still go through the motions of iterating the modeladmin registry and checking permissions it knows cannot be true, as far as I can see. Having done all that, if the app_dict is empty [and it should be], it throws a 404, whereas the ModelAdmin views themselves tend to raise PermissionDenied. The fix is pretty simple, and actually simplifies the view, if you believe shallow trumps deep.
Marking as has patch on the basis on an incoming GitHub pull request.