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.
This commit is contained in:
Joachim 2021-04-14 20:07:51 +02:00 committed by GitHub
parent 5f17b0f1e4
commit 74573b5355
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,10 +15,12 @@
{% endif %}
</h1>
</div>
{% if request.user.is_authenticated %}
<div class="column is-narrow">
{% 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" %}
</div>
{% endif %}
</header>
<div class="block">