Open thorin-schiffer opened 5 years ago
Thanks for reporting @eviltnan. I've added a PR (#4952) to address this, if you'd like to take a look / comment? Just awaiting on feedback from core team members.
Looks good to me! Thank you for researching :)
Issue Summary
Modeladmin PermissionHelper looking up for permission objects with self.opts.app_label/self.opts.model_name, which is not correct for proxy models.
Steps to Reproduce
looks like PermissionHelpers method get_all_model_permissions returns empty queryset, because its looking up as:
but permissions for proxy models would refer to the parent model (see https://stackoverflow.com/questions/15037642/django-proxy-model-permissions-do-not-appear)
so probably the correct way would be to use parent's meta in
__init__
:???? should be replaced with a upwards lookup for non proxy model in the hierarchy.
Technical details
3.6.6
.2.0.9
2.1.3