Ticket #11513: admin-change-redirect-permissions-check.diff

File admin-change-redirect-permissions-check.diff, 626 bytes (added by Richard Laager, 15 years ago)
  • contrib/admin/options.py

     
    646646            return HttpResponseRedirect("../add/")
    647647        else:
    648648            self.message_user(request, msg)
    649             return HttpResponseRedirect("../")
     649            if self.has_change_permission(request, None):
     650                return HttpResponseRedirect("../")
     651            else:
     652                return HttpResponseRedirect(request.path)
    650653
    651654    def response_action(self, request, queryset):
    652655        """
Back to Top