Add user post wiping

If a user has spammed a lot of posts and made a mess of the board, this
will allow us to delete all posts by the offending user from the same
IP.

Signed-off-by: Alek Ratzloff <alekratz@gmail.com>
This commit is contained in:
2022-07-17 16:59:23 -07:00
parent 8ea95a927c
commit 1856adaf3b
6 changed files with 90 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
{% if user.is_staff %}
data-ban-url="{% url 'board:ban_create' board.url post.id %}"
data-modify-url="{% url 'board:post_modify' post.id %}"
data-wipe-url="{% url 'board:post_wipe' post.id %}"
{% endif %}
>

View File

@@ -0,0 +1,10 @@
{% extends "board/base.html" %}
{% load i18n %}
{% block content %}
{% blocktranslate %}This will delete {{all_posts_count}} posts.{% endblocktranslate %}
<form method="post" {# action="{% url 'board:post_wipe_success' %}" #}>
{% csrf_token %}
<input type="submit" value="Wipe all posts by this user" />
</form>
{% endblock content %}