From 74573b5355b28d8d191440a0a181a36074dd1981 Mon Sep 17 00:00:00 2001 From: Joachim Date: Wed, 14 Apr 2021 20:07:51 +0200 Subject: [PATCH] Restrict list creation form to authenticated users When visiting the `/list` route on an instance while unauthenticated, the button to toggle the List creation form is shown. This PR aims to hide the button to unauthenticated visitors. --- bookwyrm/templates/lists/lists.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bookwyrm/templates/lists/lists.html b/bookwyrm/templates/lists/lists.html index 27e56f11..c7d789d0 100644 --- a/bookwyrm/templates/lists/lists.html +++ b/bookwyrm/templates/lists/lists.html @@ -15,10 +15,12 @@ {% endif %} + {% if request.user.is_authenticated %}
{% trans "Create List" as button_text %} {% include 'snippets/toggle/open_button.html' with controls_text="create-list" icon="plus" text=button_text focus="create-list-header" %}
+ {% endif %}