Commit 8481508c authored by Sebastien Robin's avatar Sebastien Robin

ERP5Workflow: add security declarations

parent c085db81
...@@ -84,11 +84,12 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -84,11 +84,12 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
PropertySheet.Reference, PropertySheet.Reference,
) )
security.declarePrivate('notifyCreated')
def notifyCreated(self, document): def notifyCreated(self, document):
pass pass
security.declareProtected(Permissions.View, 'getChainedPortalTypeList') security.declareProtected(Permissions.AccessContentsInformation,
'getChainedPortalTypeList')
def getChainedPortalTypeList(self): def getChainedPortalTypeList(self):
"""Returns the list of portal types that are chained to this """Returns the list of portal types that are chained to this
interaction workflow.""" interaction workflow."""
...@@ -246,6 +247,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -246,6 +247,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
script(sci) # May throw an exception. script(sci) # May throw an exception.
return filtered_transition_list return filtered_transition_list
security.declarePrivate('notifySuccess')
def notifySuccess(self, ob, transition_list, result, args=None, kw=None): def notifySuccess(self, ob, transition_list, result, args=None, kw=None):
""" """
Notifies this workflow that an action has taken place. Notifies this workflow that an action has taken place.
...@@ -344,6 +346,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -344,6 +346,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
finally: finally:
setSecurityManager(current_security_manager) setSecurityManager(current_security_manager)
security.declarePrivate('activeScript')
def activeScript(self, script_name, ob_url, former_status, tdef_id, def activeScript(self, script_name, ob_url, former_status, tdef_id,
script_context=None): script_context=None):
script_context = self._asScriptContext() script_context = self._asScriptContext()
...@@ -354,6 +357,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -354,6 +357,7 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
ob, self, former_status, tdef, None, None, None) ob, self, former_status, tdef, None, None, None)
script(sci) script(sci)
security.declarePrivate('isActionSupported')
def isActionSupported(self, document, action, **kw): def isActionSupported(self, document, action, **kw):
''' '''
Returns a true value if the given action name Returns a true value if the given action name
...@@ -371,12 +375,17 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow): ...@@ -371,12 +375,17 @@ class InteractionWorkflow(IdAsReferenceMixin("", "prefix"), Workflow):
return 1 return 1
return 0 return 0
security.declareProtected(Permissions.AccessContentsInformation,
'getStateValueById')
def getStateValueById(self, reference): def getStateValueById(self, reference):
return None return None
security.declareProtected(Permissions.AccessContentsInformation,
'getStateValueList')
def getStateValueList(self): def getStateValueList(self):
return [] return []
security.declareProtected(Permissions.AccessContentsInformation, 'showAsXML')
def showAsXML(self, root=None): def showAsXML(self, root=None):
if root is None: if root is None:
root = Element('erp5') root = Element('erp5')
......
...@@ -60,6 +60,7 @@ class PermissionRoles(XMLObject): ...@@ -60,6 +60,7 @@ class PermissionRoles(XMLObject):
PropertySheet.DublinCore, PropertySheet.DublinCore,
PropertySheet.State,) PropertySheet.State,)
security.declarePrivate('getPermissionRole')
def getPermissionRole(self): def getPermissionRole(self):
permission = 'None' permission = 'None'
role = 'None' role = 'None'
......
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