Ticket #6819: 6819.patch

File 6819.patch, 830 bytes (added by Robert Myers, 17 years ago)
  • django/contrib/admin/options.py

     
    632632            obj.delete()
    633633            LogEntry.objects.log_action(request.user.id, ContentType.objects.get_for_model(self.model).id, object_id, obj_display, DELETION)
    634634            request.user.message_set.create(message=_('The %(name)s "%(obj)s" was deleted successfully.') % {'name': force_unicode(opts.verbose_name), 'obj': force_unicode(obj_display)})
     635            if not self.has_change_permission(request, None):
     636                return HttpResponseRedirect("../../../../")
    635637            return HttpResponseRedirect("../../")
    636638        extra_context = {
    637639            "title": _("Are you sure?"),
Back to Top