You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
The text was updated successfully, but these errors were encountered: