Commit e8b1ec3d authored by iv's avatar iv

ERP5Workflow: override accessor private methods

the private setters are called by methods like 'edit', ...
parent 7395c567
...@@ -140,12 +140,13 @@ class GuardableMixin(object): ...@@ -140,12 +140,13 @@ class GuardableMixin(object):
return changed return changed
security.declareProtected(ManagePortal, 'setGuardExpression') def _setGuardExpression(self, text):
def setGuardExpression(self, text): if text:
self.guard_expression = Expression(text) self.guard_expression = Expression(text)
else:
self.guard_expression = None
security.declareProtected(ManagePortal, 'getGuardExpression') def _getGuardExpression(self):
def getGuardExpression(self):
if self.guard_expression is None: if self.guard_expression is None:
return Expression('') return Expression('')
return self.guard_expression return self.guard_expression
......
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