Ticket #17097: comments.2.patch

File comments.2.patch, 747 bytes (added by ghickman, 8 years ago)
  • django/contrib/comments/admin.py

    diff --git a/django/contrib/comments/admin.py b/django/contrib/comments/admin.py
    index 4cb9066..bfff028 100644
    a b class CommentsAdmin(admin.ModelAdmin): 
    2727
    2828    def get_actions(self, request):
    2929        actions = super(CommentsAdmin, self).get_actions(request)
    30         # Only superusers should be able to delete the comments from the DB.
    31         if not request.user.is_superuser and 'delete_selected' in actions:
     30        if not self.has_delete_permission(request) and 'delete_selected' in actions:
    3231            actions.pop('delete_selected')
    3332        if not request.user.has_perm('comments.can_moderate'):
    3433            if 'approve_comments' in actions:
Back to Top