Commit ea409a78 authored by Vincent Pelletier's avatar Vincent Pelletier

Make public methods which are not context-dependent.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36391 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 50dd713b
...@@ -163,15 +163,12 @@ class ActiveObject(ExtensionClass.Base): ...@@ -163,15 +163,12 @@ class ActiveObject(ExtensionClass.Base):
""" """
return self.hasActivity(processing_node = VALIDATE_ERROR_STATE) return self.hasActivity(processing_node = VALIDATE_ERROR_STATE)
security.declareProtected( permissions.View, 'getActiveProcess' )
def getActiveProcess(self): def getActiveProcess(self):
activity_tool = getToolByName(self.getPortalObject(), 'portal_activities', None) activity_tool = getToolByName(self.getPortalObject(), 'portal_activities', None)
if activity_tool is None: if activity_tool is None:
return None # Do nothing if no portal_activities return None # Do nothing if no portal_activities
return activity_tool.getActiveProcess() return activity_tool.getActiveProcess()
security.declareProtected(permissions.ModifyPortalContent,
'setDefaultActivateParameters')
def setDefaultActivateParameters(self, **kw): def setDefaultActivateParameters(self, **kw):
# This method sets the default keyword parameters to activate. This is # This method sets the default keyword parameters to activate. This is
# useful when you need to specify special parameters implicitly (e.g. to # useful when you need to specify special parameters implicitly (e.g. to
...@@ -180,7 +177,6 @@ class ActiveObject(ExtensionClass.Base): ...@@ -180,7 +177,6 @@ class ActiveObject(ExtensionClass.Base):
key = ('default_activate_parameter', id(aq_base(self))) key = ('default_activate_parameter', id(aq_base(self)))
tv[key] = kw tv[key] = kw
security.declareProtected(permissions.View, 'getDefaultActivateParameterDict')
def getDefaultActivateParameterDict(self, inherit_placeless=True): def getDefaultActivateParameterDict(self, inherit_placeless=True):
# This method returns default activate parameters to self. # This method returns default activate parameters to self.
# The result can be either a dict object or None. # The result can be either a dict object or 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