# HG changeset patch # User raph # Date 1263463669 -3600 # Node ID 23294913284b93d49938080f784a2566fc503bc0 # Parent 116eb1f06072974b956e3e52fdfab9e6f75d4596 workspace followup available to anon user diff -r 116eb1f06072 -r 23294913284b src/cm/templates/site/followup.html --- a/src/cm/templates/site/followup.html Thu Jan 14 11:07:21 2010 +0100 +++ b/src/cm/templates/site/followup.html Thu Jan 14 11:07:49 2010 +0100 @@ -17,8 +17,6 @@
{% blocktrans %}This is the public feed for the workspace.{% endblocktrans %} +{% if user.is_authenticated %} + +{% endif %} - diff -r 116eb1f06072 -r 23294913284b src/cm/templates/site/text_followup.html --- a/src/cm/templates/site/text_followup.html Thu Jan 14 11:07:21 2010 +0100 +++ b/src/cm/templates/site/text_followup.html Thu Jan 14 11:07:49 2010 +0100 @@ -19,8 +19,6 @@ {% blocktrans %}This is the public feed for the text.{% endblocktrans %} +{% if user.is_authenticated %} + +{% endif %} diff -r 116eb1f06072 -r 23294913284b src/cm/views/followup.py --- a/src/cm/views/followup.py Thu Jan 14 11:07:21 2010 +0100 +++ b/src/cm/views/followup.py Thu Jan 14 11:07:49 2010 +0100 @@ -4,6 +4,7 @@ from cm.models_base import generate_key from cm.views import get_text_by_keys_or_404 from cm.utils.embed import embed_html +from cm.security import get_request_user from django import forms from django.conf import settings from django.contrib.auth.decorators import login_required @@ -18,10 +19,11 @@ import re import time -@login_required +#@login_required def followup(request): - workspace_notify_check = Notification.objects.filter(text=None,type='workspace',user=request.user, active=True).count() - own_notify_check = Notification.objects.filter(text=None,type='own',user=request.user, active=True).count() + user = get_request_user(request) + workspace_notify_check = Notification.objects.filter(text=None,type='workspace',user=user, active=True).count() + own_notify_check = Notification.objects.filter(text=None,type='own',user=user, active=True).count() if request.method == 'POST': if 'activate' in request.POST: @@ -35,7 +37,7 @@ notif_type = 'own' if notif_id == 'own_notify_check' else 'workspace' notif_val = request.POST.get(notif_id,None) if notif_val != None : - Notification.objects.set_notification(text=None, type=notif_type, active=(notif_val == 'true'), email_or_user=request.user) + Notification.objects.set_notification(text=None, type=notif_type, active=(notif_val == 'true'), email_or_user=user) return render_to_response('site/followup.html', {'workspace_notify_check':workspace_notify_check, 'own_notify_check' :own_notify_check,