[Erp5-report] r8507 - in /erp5/trunk/products: ERP5/Document/ ERP5Type/

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jul 18 17:43:48 CEST 2006


Author: jerome
Date: Tue Jul 18 17:43:46 2006
New Revision: 8507

URL: http://svn.erp5.org?rev=8507&view=rev
Log:
fix bogus security declaration for hasCellContent and improve some docstrings.


Modified:
    erp5/trunk/products/ERP5/Document/DeliveryCell.py
    erp5/trunk/products/ERP5/Document/DeliveryLine.py
    erp5/trunk/products/ERP5/Document/ProductionReportCell.py
    erp5/trunk/products/ERP5Type/XMLMatrix.py

Modified: erp5/trunk/products/ERP5/Document/DeliveryCell.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryCell.py?rev=8507&r1=8506&r2=8507&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryCell.py (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryCell.py Tue Jul 18 17:43:46 2006
@@ -82,10 +82,10 @@
     
     
     # MatrixBox methods      
-    security.declareProtected( Permissions.ModifyPortalContent, 'hasCellContent' )
+    security.declareProtected( Permissions.AccessContentsInformation,
+                               'hasCellContent' )
     def hasCellContent(self, base_id='movement'):
-      """
-          This method can be overriden
+      """A cell cannot have cell content itself.
       """
       return 0
 

Modified: erp5/trunk/products/ERP5/Document/DeliveryLine.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/DeliveryLine.py?rev=8507&r1=8506&r2=8507&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/DeliveryLine.py (original)
+++ erp5/trunk/products/ERP5/Document/DeliveryLine.py Tue Jul 18 17:43:46 2006
@@ -154,10 +154,10 @@
           return aggregate.total_quantity or 0.0
         return sum([cell.getQuantity() for cell in self.getCellValueList()])
 
-    security.declareProtected(Permissions.View, 'hasCellContent')
+    security.declareProtected(Permissions.AccessContentsInformation,
+                              'hasCellContent')
     def hasCellContent(self, base_id='movement'):
-      """
-          This method can be overriden
+      """Return true if the object contains cells.
       """
       # Do not use XMLMatrix.hasCellContent, because it can generate
       # inconsistency in catalog

Modified: erp5/trunk/products/ERP5/Document/ProductionReportCell.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/ProductionReportCell.py?rev=8507&r1=8506&r2=8507&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/ProductionReportCell.py (original)
+++ erp5/trunk/products/ERP5/Document/ProductionReportCell.py Tue Jul 18 17:43:46 2006
@@ -64,10 +64,9 @@
                       )
 
 
-    security.declareProtected(Permissions.ModifyPortalContent, 
+    security.declareProtected(Permissions.AccessContentsInformation,
                               'hasCellContent')
     def hasCellContent(self, base_id='movement'):
-      """
-          This method can be overriden
+      """A cell cannot have cell content itself.
       """
       return 0

Modified: erp5/trunk/products/ERP5Type/XMLMatrix.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/XMLMatrix.py?rev=8507&r1=8506&r2=8507&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/XMLMatrix.py (original)
+++ erp5/trunk/products/ERP5Type/XMLMatrix.py Tue Jul 18 17:43:46 2006
@@ -61,7 +61,8 @@
     security = ClassSecurityInfo()
 
     # Matrix Methods
-    security.declareProtected( Permissions.View, 'getCell' )
+    security.declareProtected( Permissions.AccessContentsInformation,
+                               'getCell' )
     def getCell(self, *kw , **kwd):
       """
           Access a cell at row and column
@@ -84,7 +85,8 @@
       cell_id = '_'.join(cell_id_list)
       return self.get(cell_id)
 
-    security.declareProtected( Permissions.View, 'getCellProperty' )
+    security.declareProtected( Permissions.AccessContentsInformation,
+                               'getCellProperty' )
     def getCellProperty(self, *kw , **kwd):
       """
           Get a property of a cell at row and column
@@ -96,7 +98,8 @@
 
       return cell.getProperty(base_id)
 
-    security.declareProtected( Permissions.View, 'hasCell' )
+    security.declareProtected( Permissions.AccessContentsInformation,
+                               'hasCell' )
     def hasCell(self, *kw , **kwd):
       """
           Checks if matrix corresponding to base_id contains cell specified
@@ -123,7 +126,8 @@
 
       return self.get(cell_id) is not None
 
-    security.declareProtected( Permissions.ModifyPortalContent, 'hasCellContent' )
+    security.declareProtected( Permissions.AccessContentsInformation,
+                               'hasCellContent' )
     def hasCellContent(self, base_id='cell'):
       """
           Checks if matrix corresponding to base_id contains cells.
@@ -142,7 +146,8 @@
 
       return 0
 
-    security.declareProtected( Permissions.View, 'hasInRange' )
+    security.declareProtected( Permissions.AccessContentsInformation,
+                               'hasInRange' )
     def hasInRange(self, *kw , **kwd):
       """
           Checks if *kw coordinates are in the range of the




More information about the Erp5-report mailing list