summaryrefslogtreecommitdiffstats
path: root/hyperkitty/templates
diff options
context:
space:
mode:
authorAurélien Bompard <aurelien@bompard.org>2013-07-11 20:17:17 +0200
committerAurélien Bompard <aurelien@bompard.org>2013-07-11 20:17:17 +0200
commit9fb58fd8fecc7c1d86ff3693eb528d9ad19e703d (patch)
treea5a2e86b1cc5918393b64bda15b6b7ed93a4bfba /hyperkitty/templates
parentce57f4cbe44d2594ff11aba8501a1d8f2727fd70 (diff)
downloadhyperkitty-9fb58fd8fecc7c1d86ff3693eb528d9ad19e703d.tar.gz
hyperkitty-9fb58fd8fecc7c1d86ff3693eb528d9ad19e703d.tar.xz
hyperkitty-9fb58fd8fecc7c1d86ff3693eb528d9ad19e703d.zip
Only allow category edition when logged-in
Diffstat (limited to 'hyperkitty/templates')
-rw-r--r--hyperkitty/templates/threads/category.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/hyperkitty/templates/threads/category.html b/hyperkitty/templates/threads/category.html
index c315a2e..71c279c 100644
--- a/hyperkitty/templates/threads/category.html
+++ b/hyperkitty/templates/threads/category.html
@@ -1,8 +1,14 @@
{% load url from future %}
{{ category_form.errors.category }}
- <a class="label" title="Click to edit"
- {% if category %}style="background-color:{{category.color}}"{% endif %}>
+ <a class="label {% if not user.is_authenticated %} disabled {% endif %}"
+ {% if category %}style="background-color:{{category.color}}"{% endif %}
+ {% if user.is_authenticated %}
+ title="Click to edit"
+ {% else %}
+ title="You must be logged-in to edit."
+ {% endif %}
+ >
{% if category %}
{{ category.name|upper }}
{% else %}