From a9009981457574b5b6f6ee210c9b20f5484b76a0 Mon Sep 17 00:00:00 2001 From: Arjun Singh Date: Wed, 12 Sep 2012 04:32:32 -0700 Subject: [PATCH] Fix anonymity leak; fix editing when rendering from main page. --- lms/djangoapps/django_comment_client/forum/views.py | 2 ++ lms/djangoapps/django_comment_client/utils.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/django_comment_client/forum/views.py b/lms/djangoapps/django_comment_client/forum/views.py index 76b00a62cd..8804623f4b 100644 --- a/lms/djangoapps/django_comment_client/forum/views.py +++ b/lms/djangoapps/django_comment_client/forum/views.py @@ -282,6 +282,8 @@ def single_thread(request, course_id, discussion_id, thread_id): thread['courseware_location'] = courseware_context['courseware_location'] thread['courseware_title'] = courseware_context['courseware_title'] + threads = [utils.safe_content(thread) for thread in threads] + #recent_active_threads = cc.search_recent_active_threads( # course_id, # recursive=False, diff --git a/lms/djangoapps/django_comment_client/utils.py b/lms/djangoapps/django_comment_client/utils.py index 1a24bdf565..a4ab9342d2 100644 --- a/lms/djangoapps/django_comment_client/utils.py +++ b/lms/djangoapps/django_comment_client/utils.py @@ -273,7 +273,7 @@ def safe_content(content): 'created_at', 'updated_at', 'depth', 'type', 'commentable_id', 'comments_count', 'at_position_list', 'children', 'highlighted_title', 'highlighted_body', - 'courseware_title', 'courseware_location' + 'courseware_title', 'courseware_location', 'tags' ] if content.get('anonymous') is False: