Replace the can_manage method with a can_review method that checks the 'Review comments' permission. This fixes http://dev.plone.org/plone/ticket/11145.

svn path=/plone.app.discussion/trunk/; revision=40534
This commit is contained in:
Timo Stollenwerk
2010-10-06 13:55:57 +00:00
parent 3e73903a8d
commit 4bbfe677e4
3 changed files with 23 additions and 15 deletions
+7 -3
View File
@@ -241,13 +241,17 @@ class CommentsViewlet(ViewletBase):
mimetype=mimetype).getData()
def can_reply(self):
"""Returns true if current user has the 'Reply to item' permission.
"""
return getSecurityManager().checkPermission('Reply to item',
aq_inner(self.context))
def can_manage(self):
return getSecurityManager().checkPermission('Manage portal',
def can_review(self):
"""Returns true if current user has the 'Review comments' permission.
"""
return getSecurityManager().checkPermission('Review comments',
aq_inner(self.context))
def is_discussion_allowed(self):
context = aq_inner(self.context)
conversation = IConversation(context)