PR for Admin view permission

106 views
Skip to first unread message

Olivier Dalang

unread,
Dec 5, 2017, 4:51:17 PM12/5/17
to django-d...@googlegroups.com
Hi !

Just wanted to draw attention towards PR 6734 that adds a view permission to Django admin (original work done by PetrDlouhy). I was hoping to get it merged for 1.11, then 2.0.

I just merged in the new code, and now there's some tests failing again.

If I fix those, will it get merged ? I'm not familiar with Django's dev process, but I think this checked all the boxes (PR reviewed, tests, doc, other user's support, etc...).

Thanks for all the good work !

Olivier

Fred F

unread,
Dec 22, 2017, 10:09:55 AM12/22/17
to Django developers (Contributions to Django itself)
Hi,

thank you everybody for the good job on this. I have tested Oliver's view_permission_master branch with two of my projects and it works like expected:

- User was only able to *view* models
- Search and list filters remained completely functional
- InlineModelAdmins only showed up if the "view" permission was there for the relevant models

So far, so good. I have found only one issue: when using a TabularInline instead of a StackedInline I am getting an exception (KeyError in admin/helpers.py:286). I think this is due to the fact that in `InlineAdminFormSet` you only assign the fieldset fields to `viewonly_fields`. But I think this should be an easy fix.

I am in desperate need of the "view" permission feature for several projects, so it would be really cool if this could be merged. I also know from other Django users out there that this is an important and wanted feature. Since the original PR is over two years old I am wondering what the reasons are for not accepting it? Could anyone from the Django dev team comment on this please?


Regards,
Fred
Reply all
Reply to author
Forward
0 new messages