Ticket #17097: comments.patch

File comments.patch, 760 bytes (added by george@…, 13 years ago)

Patch file

  • django/contrib/comments/admin.py

    diff --git a/django/contrib/comments/admin.py b/django/contrib/comments/admin.py
    index 4cb9066..5eeca06 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 request.user.has_perm('comments.delete_comment') 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