Ticket #28517: 28517.patch

File 28517.patch, 650 bytes (added by Paulo, 7 years ago)
  • django/contrib/admin/utils.py

    diff --git django/contrib/admin/utils.py django/contrib/admin/utils.py
    index 5f3a83267d..350493a938 100644
    def get_deleted_objects(objs, opts, user, admin_site, using):  
    152152
    153153            p = '%s.%s' % (opts.app_label,
    154154                           get_permission_codename('delete', opts))
    155             if not user.has_perm(p):
     155            if 'delete' in opts.default_permissions and not user.has_perm(p):
    156156                perms_needed.add(opts.verbose_name)
    157157            # Display a link to the admin page.
    158158            return format_html('{}: <a href="{}">{}</a>',
Back to Top