Commit 66932d5f authored by Nicolas Wavrant's avatar Nicolas Wavrant

Improve previous commit by minimizing number of function calls

parent 9b5d954a
......@@ -30,7 +30,7 @@
import zope.interface
from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5Type.UnrestrictedMethod import super_user
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.mixin.configurable import ConfigurableMixin
......@@ -50,9 +50,9 @@ class SolverMixin(object):
# Implementation of ISolver
security.declarePrivate('solve')
@UnrestrictedMethod
def solve(self, activate_kw=None):
self._solve(activate_kw=activate_kw)
with super_user():
self._solve(activate_kw=activate_kw)
def getPortalTypeValue(self):
return self.getPortalObject().portal_solvers._getOb(self.getPortalType())
......
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