Commit b307e4c4 authored by Jérome Perrin's avatar Jérome Perrin

Use unrestricted_apply for predicate script

Predicate security is checked at higher levels
parent d2349b68
...@@ -45,6 +45,7 @@ from Products.ERP5Type.TransactionalVariable import getTransactionalVariable ...@@ -45,6 +45,7 @@ from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ZSQLCatalog.SQLCatalog import SQLQuery from Products.ZSQLCatalog.SQLCatalog import SQLQuery
from Products.ERP5Type.Globals import PersistentMapping from Products.ERP5Type.Globals import PersistentMapping
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5Type.UnrestrictedMethod import unrestricted_apply
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
class Predicate(XMLObject): class Predicate(XMLObject):
...@@ -596,7 +597,7 @@ class Predicate(XMLObject): ...@@ -596,7 +597,7 @@ class Predicate(XMLObject):
try: try:
return cache[key] return cache[key]
except KeyError: except KeyError:
self = self._getTypeBasedMethod("asPredicate", "_asPredicate")() self = unrestricted_apply(self._getTypeBasedMethod("asPredicate", "_asPredicate"))
cache[key] = self cache[key] = self
return self return self
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment