summaryrefslogtreecommitdiffstats
path: root/ogcp/templates/images.html
diff options
context:
space:
mode:
Diffstat (limited to 'ogcp/templates/images.html')
-rw-r--r--ogcp/templates/images.html16
1 files changed, 9 insertions, 7 deletions
diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html
index c439e52..00bb2e4 100644
--- a/ogcp/templates/images.html
+++ b/ogcp/templates/images.html
@@ -58,13 +58,15 @@
{% endblock %}
{% block commands %}
- <input class="btn btn-light" type="submit" value="{{ _('Image details') }}"
- form="imagesForm" formaction="{{ url_for('action_image_info') }}" formmethod="get">
- <input class="btn btn-light" type="submit" value="{{ _('List images') }}"
- form="imagesForm" formaction="{{ url_for('action_image_list') }}" formmethod="get">
-{% if current_user.admin %}
- <input class="btn btn-light" type="submit" value="{{ _('Delete image') }}"
- form="imagesForm" formaction="{{ url_for('action_image_delete') }}" formmethod="get">
+{% if current_user.is_authenticated %}
+ <input class="btn btn-light" type="submit" value="{{ _('Image details') }}"
+ form="imagesForm" formaction="{{ url_for('action_image_info') }}" formmethod="get">
+ <input class="btn btn-light" type="submit" value="{{ _('List images') }}"
+ form="imagesForm" formaction="{{ url_for('action_image_list') }}" formmethod="get">
+ {% if current_user.get_permission('IMAGE', 'DELETE') %}
+ <input class="btn btn-light" type="submit" value="{{ _('Delete image') }}"
+ form="imagesForm" formaction="{{ url_for('action_image_delete') }}" formmethod="get">
+ {% endif %}
{% endif %}
{% if btn_back %}
<button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">