Fix SAS being accessible for non-connected users (wtf)

This commit is contained in:
Julien Constant 2023-03-12 14:06:42 +01:00
parent 2bb8e0b231
commit fe31d8cfda
No known key found for this signature in database
GPG Key ID: 816E7C070117E5B7
2 changed files with 64 additions and 54 deletions

View File

@ -5301,6 +5301,10 @@ msgstr "Cet album ne contient aucune photo."
msgid "preview"
msgstr "miniature"
#: sas/templates/sas/main.jinja:42
msgid "You must be logged in to see the SAS."
msgstr "Vous devez être connecté pour voir les photos."
#: sas/templates/sas/album.jinja:89
msgid "Upload"
msgstr "Envoyer"

View File

@ -37,8 +37,13 @@
{% block content %}
<h3>{% trans %}SAS{% endtrans %}</h3>
{% if not user.is_authenticated %}
<p>{% trans %}You must be logged in to see the SAS.{% endtrans %}</p>
{% else %}
<br>
<h4>{% trans %}Latest albums{% endtrans %}</h4>
<div class="albums">
{% for a in latest %}
{{ display_album(a) }}
@ -100,4 +105,5 @@
{{ form.album_name.errors }}
</form>
{% endif %}
{% endif %}
{% endblock %}