Commit b1ed45a9 authored by Jean-Paul Smets's avatar Jean-Paul Smets

Better support for default

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13852 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f91f3662
......@@ -29,6 +29,8 @@ from Products.ERP5Type import Permissions
from zLOG import LOG
_MARKER = []
class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
"""
The InteractionTool implements portal object
......@@ -149,7 +151,9 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
Allows the user to request information provided by the
workflow. This method must perform its own security checks.
'''
vdef = self.variables[name]
vdef = self.variables.get(name, _MARKER)
if vdef is _MARKER:
return default
if vdef.info_guard is not None and not vdef.info_guard.check(
getSecurityManager(), self, ob):
return default
......
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