Commit 8316dcce authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

workflow: guard transition by 'Modify portal content' permission by default.

parent 2d0eeaaf
......@@ -340,6 +340,14 @@ def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info,
DCWorkflowDefinition.security.declarePrivate('getWorklistVariableMatchDict')
DCWorkflowDefinition.getWorklistVariableMatchDict = DCWorkflowDefinition_getWorklistVariableMatchDict
TransitionDefinition__init__orig = TransitionDefinition.__init__
def TransitionDefinition__init__(self, *args, **kw):
TransitionDefinition__init__orig(self, *args, **kw)
self.guard = Guard()
self.guard.permissions = ('Modify portal content',)
TransitionDefinition.__init__ = TransitionDefinition__init__
class ValidationFailed(Exception):
"""Transition can not be executed because data is not in consistent state"""
__allow_access_to_unprotected_subobjects__ = {'msg': 1}
......
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