Commit 4fcc6a0d authored by Jérome Perrin's avatar Jérome Perrin

change permissions from View to AccessContentsInformation


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5414 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 46148e8b
...@@ -73,21 +73,24 @@ class SupplyLink(Path, XMLObject): ...@@ -73,21 +73,24 @@ class SupplyLink(Path, XMLObject):
, PropertySheet.Simulation , PropertySheet.Simulation
) )
security.declareProtected(Permissions.View, 'isProductionSupplyLink') security.declareProtected(Permissions.AccessContentsInformation,
'isProductionSupplyLink')
def isProductionSupplyLink(self): def isProductionSupplyLink(self):
""" """
Return 1 if the SupplyLink represents a production. Return 1 if the SupplyLink represents a production.
""" """
return (self.getSourceValue() is None) return (self.getSourceValue() is None)
security.declareProtected(Permissions.View, 'isPackingListSupplyLink') security.declareProtected(Permissions.AccessContentsInformation,
'isPackingListSupplyLink')
def isPackingListSupplyLink(self): def isPackingListSupplyLink(self):
""" """
Return 1 if the SupplyLink represents a packing list. Return 1 if the SupplyLink represents a packing list.
""" """
return not(self.isProductionSupplyLink()) return not(self.isProductionSupplyLink())
security.declareProtected(Permissions.View, 'getCurrentNodeValue') security.declareProtected(Permissions.AccessContentsInformation,
'getCurrentNodeValue')
def getCurrentNodeValue(self): def getCurrentNodeValue(self):
""" """
Return the node used to find the previous SupplyLink Return the node used to find the previous SupplyLink
...@@ -98,14 +101,16 @@ class SupplyLink(Path, XMLObject): ...@@ -98,14 +101,16 @@ class SupplyLink(Path, XMLObject):
node = self.getSourceValue() node = self.getSourceValue()
return node return node
security.declareProtected(Permissions.View, 'getNextNodeValue') security.declareProtected(Permissions.AccessContentsInformation,
'getNextNodeValue')
def getNextNodeValue(self): def getNextNodeValue(self):
""" """
Return the node used to find the next SupplyLink Return the node used to find the next SupplyLink
""" """
return self.getDestinationValue() return self.getDestinationValue()
security.declareProtected(Permissions.View, 'test') security.declareProtected(Permissions.AccessContentsInformation,
'test')
def test(self, movement, concurrent_supply_link_list): def test(self, movement, concurrent_supply_link_list):
""" """
Test if the current link can expand this movement. Test if the current link can expand this movement.
...@@ -159,7 +164,8 @@ class SupplyLink(Path, XMLObject): ...@@ -159,7 +164,8 @@ class SupplyLink(Path, XMLObject):
result = 1 result = 1
return result return result
security.declareProtected(Permissions.View, 'getStartDate') security.declareProtected(Permissions.AccessContentsInformation,
'getStartDate')
def getStartDate(self, stop_date): def getStartDate(self, stop_date):
""" """
Calculate the start date, depending on the delay. Calculate the start date, depending on the delay.
...@@ -171,3 +177,4 @@ class SupplyLink(Path, XMLObject): ...@@ -171,3 +177,4 @@ class SupplyLink(Path, XMLObject):
start_date = stop_date - delay start_date = stop_date - delay
break break
return start_date return start_date
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