publish only pending comment, else show status message
This commit is contained in:
parent
6ca9e6f4e9
commit
ee6b107a31
@ -8,6 +8,7 @@ from plone.app.discussion.events import CommentDeletedEvent
|
|||||||
from plone.app.discussion.interfaces import _
|
from plone.app.discussion.interfaces import _
|
||||||
from plone.app.discussion.interfaces import IComment
|
from plone.app.discussion.interfaces import IComment
|
||||||
from plone.app.discussion.interfaces import IReplies
|
from plone.app.discussion.interfaces import IReplies
|
||||||
|
from plone.protect.interfaces import IDisableCSRFProtection
|
||||||
from Products.CMFCore.utils import getToolByName
|
from Products.CMFCore.utils import getToolByName
|
||||||
from Products.Five.browser import BrowserView
|
from Products.Five.browser import BrowserView
|
||||||
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
|
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
|
||||||
@ -206,6 +207,7 @@ class PublishComment(BrowserView):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __call__(self):
|
def __call__(self):
|
||||||
|
alsoProvides(self.request, IDisableCSRFProtection)
|
||||||
comment = aq_inner(self.context)
|
comment = aq_inner(self.context)
|
||||||
content_object = aq_parent(aq_parent(comment))
|
content_object = aq_parent(aq_parent(comment))
|
||||||
workflowTool = getToolByName(comment, 'portal_workflow', None)
|
workflowTool = getToolByName(comment, 'portal_workflow', None)
|
||||||
|
Loading…
Reference in New Issue
Block a user