summaryrefslogtreecommitdiffstats
path: root/ogcp/templates
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-05 16:49:53 +0200
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-06-07 14:35:41 +0200
commiteb1b1c4cdfd26210115f1dc4ce5f0e8c99fe5711 (patch)
treec5e925c3411e2fb1c1d55d7c0e083182e967116f /ogcp/templates
parentff3e2d6ff4e13ca99bea715ee14562feb1f9d75a (diff)
templates: show Delete Image only as admin
Hide the Delete Image in user mode using template conditionals. A non admin account should not have access to image deletion.
Diffstat (limited to 'ogcp/templates')
-rw-r--r--ogcp/templates/images.html2
1 files changed, 2 insertions, 0 deletions
diff --git a/ogcp/templates/images.html b/ogcp/templates/images.html
index c0b4359..c439e52 100644
--- a/ogcp/templates/images.html
+++ b/ogcp/templates/images.html
@@ -62,8 +62,10 @@
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">
+{% endif %}
{% if btn_back %}
<button class="btn btn-danger ml-3" type="button" id="backButton" onclick="history.back()">
{{ _("Back") }}