Skip to content

Commit 525c3eb

Browse files
authored
Merge pull request #179 from syslabcom/scrum-2305-sehepunkte-csrf
Sehepunkte import: Allow write on read
2 parents d65e49e + 34176c0 commit 525c3eb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/recensio/plone/browser/sehepunkte.py

+4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
from itertools import chain
55
from plone import api
66
from plone.app.textfield.value import RichTextValue
7+
from plone.protect.interfaces import IDisableCSRFProtection
78
from Products.CMFCore.utils import getToolByName
89
from Products.Five.browser import BrowserView
910
from recensio.plone.sehepunkte import sehepunkte_parser
1011
from recensio.plone.tools import convertToString
1112
from z3c.relationfield.relation import RelationValue
1213
from zope.component import getUtility
1314
from zope.event import notify
15+
from zope.interface import alsoProvides
1416
from zope.intid.interfaces import IIntIds
1517
from zope.lifecycleevent import ObjectModifiedEvent
1618
from zope.schema.interfaces import IVocabularyFactory
@@ -126,6 +128,8 @@ def __call__(self):
126128
total,
127129
total and review_count / total or review_count,
128130
)
131+
if review_count > 0:
132+
alsoProvides(self.request, IDisableCSRFProtection)
129133
return "Success"
130134

131135
def _getTargetURLs(self):

0 commit comments

Comments
 (0)