From b3e12b975064f0873bdb4d2834cae75925387d6b Mon Sep 17 00:00:00 2001 From: Dennis Fink Date: Mon, 10 Aug 2026 23:28:03 +0200 Subject: feat(core): add received webmention admin actions Add authenticated delete and reverify actions to the received webmentions admin view and protect them with CSRF validation. Enable CSRF protection globally while exempting the public Webmention endpoint. --- webmentions_ssg/templates/received.html | 97 ++++++++++++++++++++++++++++++--- 1 file changed, 88 insertions(+), 9 deletions(-) (limited to 'webmentions_ssg/templates') diff --git a/webmentions_ssg/templates/received.html b/webmentions_ssg/templates/received.html index ea74557..64f225e 100644 --- a/webmentions_ssg/templates/received.html +++ b/webmentions_ssg/templates/received.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% from "bootstrap5/form.html" import render_form %} {% from "bootstrap5/pagination.html" import render_pagination %} {% block content %}
@@ -16,16 +17,20 @@ Received Updated Reason + Actions {% for webmention in webmentions %} - {% if webmention.status == "verified" %} + {% if webmention.status == "received" %} + {% set row_class = "table-info" %} + {% set display_status = "Pending" %} + {% elif webmention.status == "verifying" %} + {% set row_class = "table-warning" %} + {% set display_status = "Verifying" %} + {% elif webmention.status == "verified" %} {% set row_class = "table-success" %} {% set display_status = "Verified" %} - {% elif webmention.status in ("received", "verifying") %} - {% set row_class = "table-warning" %} - {% set display_status = "Pending" %} {% else %} {% set row_class = "table-danger" %} {% set display_status = "Declined" %} @@ -51,19 +56,93 @@ {{ webmention.failure_reason or "—" }} + + + + {% endfor %}
{% if webmentions.pages > 1 %} -
- {{ render_pagination(webmentions, - align="center", - size="sm") }} -
+
{{ render_pagination(webmentions) }}
{% endif %} + {% else %}

No Webmentions have been received yet.

{% endif %} {% endblock %} +{% block scripts %} + {{ super() }} + +{% endblock %} -- cgit v1.3.1