Skip to content

Commit

Permalink
publish only pending comment, else show status message
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Jan 8, 2020
1 parent 6ca9e6f commit ee6b107
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plone/app/discussion/browser/moderation.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from plone.app.discussion.interfaces import _
from plone.app.discussion.interfaces import IComment
from plone.app.discussion.interfaces import IReplies
from plone.protect.interfaces import IDisableCSRFProtection
from Products.CMFCore.utils import getToolByName
from Products.Five.browser import BrowserView
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
Expand Down Expand Up @@ -206,6 +207,7 @@ class PublishComment(BrowserView):
"""

def __call__(self):
alsoProvides(self.request, IDisableCSRFProtection)
comment = aq_inner(self.context)
content_object = aq_parent(aq_parent(comment))
workflowTool = getToolByName(comment, 'portal_workflow', None)
Expand Down

0 comments on commit ee6b107

Please sign in to comment.