Non authenticated users aren't allowed to use forum for now
[edumed.git] / catalogue / templates / catalogue / lesson / lesson_detail.html
index adc5dc3..f08b5b8 100755 (executable)
 </footer>
 
 
-{% if object.forum_topics.all.count %}
-<h2>Na forum</h2>
-<ul>
-{% for forum_topic in object.forum_topics.all %}
-    <li><a href="{{forum_topic.pybb_topic.get_absolute_url}}">{{forum_topic.pybb_topic.name}}</a></li>
-{% endfor %}
-</ul>
+{% if request.user.is_authenticated and object.forum_topics.all.count %}
+    <h2>Na forum</h2>
+    <ul>
+    {% for forum_topic in object.forum_topics.all %}
+        <li><a href="{{forum_topic.pybb_topic.get_absolute_url}}">{{forum_topic.pybb_topic.name}}</a></li>
+    {% endfor %}
+    </ul>
 {% endif %}
 
 </div>