def METHOD_NAME(self, request, *args, **kwargs):
    if not settings.COMMENTS_COMMUNITY_MODERATION or not request.user.has_perm('django_comments_xtd.can_moderate'):
        raise PermissionDenied(
            "You do not have permission."
        )
    return super().METHOD_NAME(request, *args, **kwargs)