In admin when rendering a change form the breadcrumb menu includes a link 
to the changelist, or only a text. The template’s variable 
has_change_permission is used to decide which to show.

As far as I understand the variable is set in ModelAdmin to 
has_change_permissions(request, 
obj) by default, but a user with has_change_permissions(request, obj=None) 
returning False will get a permission error clicking the link. I propose to 
take account of the possibility that the implication

has_change_permissions(request, obj) is True implies 
has_change_permissions(request, obj=None) is True


is not true.

The redirect behaviour in ModelAdmin's response_post_save_add et al. seems 
to handle this case. My implementation idea is to add another template 
variable in AdminModel's render_change_form.

If this change and implementation is welcomed I can try to create a patch 
if someone can provide guidance for what to do besides the two one line 
changes.

Greetings

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/62d320b1-338c-4e06-9abb-75f97a1a7859%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to