From c35b631e36d0fbf1f307b326b83d9c5b0ea468a1 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Sun, 21 Jun 2009 08:29:42 +0000 Subject: [PATCH] don't show non-published comments to anonymous users. svn path=/plone.app.discussion/trunk/; revision=27567 --- plone/app/discussion/browser/comments.pt | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plone/app/discussion/browser/comments.pt b/plone/app/discussion/browser/comments.pt index fcc4468..a8bafab 100644 --- a/plone/app/discussion/browser/comments.pt +++ b/plone/app/discussion/browser/comments.pt @@ -5,7 +5,8 @@ canManage view/can_manage; replies python:view.get_replies(canManage); showCommenterImage view/show_commenter_image; - errors options/state/getErrors|nothing;" + errors options/state/getErrors|nothing; + wtool context/@@plone_tools/workflow" tal:condition="isDiscussionAllowed" i18n:domain="plone"> @@ -31,10 +32,12 @@ creator reply/Creator; author_home_url python:view.get_commenter_home_url(username=reply.author_username); portrait_url python:view.get_commenter_portrait(reply.author_username); - anonymous_creator python:creator in ('Anonymous User', '');" + anonymous_creator python:creator in ('Anonymous User', ''); + published python:wtool.getInfoFor(reply, 'review_state') == 'published';" tal:attributes="class python:'comment replyTreeLevel'+str(depth); style string:margin-left: ${depth}em; - id string:${reply/id}"> + id string:${reply/id}" + tal:condition="python:canManage or published and isAnon">