PR for Admin view permission

107 visualizações
Pular para a primeira mensagem não lida

Olivier Dalang

não lida,
5 de dez. de 2017, 16:51:1705/12/2017
para 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

não lida,
22 de dez. de 2017, 10:09:5522/12/2017
para 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
Responder a todos
Responder ao autor
Encaminhar
0 nova mensagem