do not show moderation message when user has manage rights.

svn path=/plone.app.discussion/trunk/; revision=30997
This commit is contained in:
Timo Stollenwerk 2009-10-31 16:42:04 +00:00
parent 7550e95d5c
commit 94adf62566

View File

@ -200,9 +200,11 @@ class CommentForm(extensible.ExtensibleForm, form.Form):
# Add comment to the conversation # Add comment to the conversation
comment_id = conversation.addComment(comment) comment_id = conversation.addComment(comment)
can_manage = getSecurityManager().checkPermission('Manage portal', aq_inner(self.context))
# Show info message when comment moderation is enabled # Show info message when comment moderation is enabled
if wf.getChainForPortalType('Discussion Item') == \ if wf.getChainForPortalType('Discussion Item') == \
('comment_review_workflow',): ('comment_review_workflow',) and not can_manage:
IStatusMessage(self.context.REQUEST).addStatusMessage( IStatusMessage(self.context.REQUEST).addStatusMessage(
_("Your comment awaits moderator approval."), _("Your comment awaits moderator approval."),