links without login only for lazy user
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Sun, 19 Nov 2017 19:14:53 +0000 (20:14 +0100)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Sun, 19 Nov 2017 19:14:53 +0000 (20:14 +0100)
TODO
django_simple/todo/templates/details1.html

diff --git a/TODO b/TODO
index 237b3d4..98c2883 100644 (file)
--- a/TODO
+++ b/TODO
@@ -63,9 +63,10 @@ information on how to interpret the results returned by the web server
 # results notification. Any request for an email must state that it is
 # optional. Websites that use a guest login will not be approved
 #
-# OK link uses task.id http://ha1.chem.univ.gda.pl:8001/details/942/
+# OK link uses task.id and user.id
+# http://ha1.chem.univ.gda.pl:8001/details1/19da81cb0ad5492dac8e4eaefd28949e/942/
 
 # keep every user’s submitted data private and not viewable by anyone other
 # than the user or those given permission by the user
 #
-# OK ? scramble task.id ? add user.id= 19da81cb0ad5492dac8e4eaefd28949e ?
+# OK - additionaly blocks links of regular user without login
index 911496c..abe2f11 100644 (file)
@@ -3,6 +3,8 @@
 {% load i18n lazysignup_tags %}
 {% block content %}
 
+{% if task.owner|is_lazy_user %}
+
 <ul class="list-group">
 
 <li class="list-group-item new-task-item task-item">
@@ -525,4 +527,9 @@ Created {{ task.created_date  }}
        {% endif %}             
 
        </ul>
+{% else %}
+<h2>
+Regular user cannot use this link.
+</h2>
+{% endif %}
 {% endblock %}