[Erp5-report] r31987 jm - /erp5/trunk/products/ERP5Type/Base.py

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Jan 26 15:42:07 CET 2010


Author: jm
Date: Tue Jan 26 15:42:04 2010
New Revision: 31987

URL: http://svn.erp5.org?rev=31987&view=rev
Log:
ERP5Type.Base: change security of some accessors to AccessContentsInformation (instead of View)

Modified:
    erp5/trunk/products/ERP5Type/Base.py

Modified: erp5/trunk/products/ERP5Type/Base.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/Base.py?rev=31987&r1=31986&r2=31987&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/Base.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/Base.py [utf8] Tue Jan 26 15:42:04 2010
@@ -1555,7 +1555,8 @@
     #  # This should be removed if we want strict property checking
     #  setattr(self, key, value)
 
-  security.declareProtected( Permissions.View, 'hasProperty' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'hasProperty')
   def hasProperty(self, key):
     """
       Previous Name: hasValue
@@ -1596,7 +1597,8 @@
           return 1
       return 0
 
-  security.declareProtected( Permissions.View, 'hasCategory' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'hasCategory')
   def hasCategory(self, key):
     """
       Previous Name: hasValue
@@ -2087,7 +2089,8 @@
     else:
       return self._getCategoryTool().resolveCategory(path)
 
-  security.declareProtected( Permissions.View, 'getDefaultValue' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getDefaultValue')
   getDefaultValue = _getDefaultValue
 
   def _getValueList(self, id, spec=(), filter=None, portal_type=(), checked_permission=None):
@@ -2153,7 +2156,8 @@
     except IndexError:
       return None
 
-  security.declareProtected(Permissions.View, 'getDefaultRelatedValue')
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getDefaultRelatedValue')
   getDefaultRelatedValue = _getDefaultRelatedValue
 
   def _getRelatedValueList(self, *args, **kw):
@@ -2162,7 +2166,8 @@
       kw['strict_membership'] = kw.pop('strict')
     return self._getCategoryTool().getRelatedValueList(self, *args, **kw)
 
-  security.declareProtected(Permissions.View, 'getRelatedValueList')
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getRelatedValueList')
   getRelatedValueList = _getRelatedValueList
 
   def _getDefaultRelatedProperty(self, id, property_name, spec=(), filter=None,
@@ -2198,7 +2203,8 @@
                              'getRelatedPropertyList' )
   getRelatedPropertyList = _getRelatedPropertyList
 
-  security.declareProtected( Permissions.View, 'getValueUidList' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getValueUidList')
   def getValueUidList(self, id, spec=(), filter=None, portal_type=(), checked_permission=None):
     uid_list = []
     for o in self._getValueList(id, spec=spec, filter=filter, portal_type=portal_type,
@@ -2355,10 +2361,12 @@
     else:
       return default
 
-  security.declareProtected( Permissions.View, 'getDefaultAcquiredCategoryMembership' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getDefaultAcquiredCategoryMembership')
   getDefaultAcquiredCategoryMembership = _getDefaultAcquiredCategoryMembership
 
-  security.declareProtected( Permissions.View, 'getCategoryList' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getCategoryList')
   def getCategoryList(self):
     """
       Returns the list of local categories
@@ -2368,7 +2376,8 @@
   def _getCategoryList(self):
     return self._getCategoryTool()._getCategoryList(self)
 
-  security.declareProtected( Permissions.View, 'getAcquiredCategoryList' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getAcquiredCategoryList')
   def getAcquiredCategoryList(self):
     """
       Returns the list of acquired categories
@@ -2385,7 +2394,8 @@
   def _setCategoryList(self, path_list):
     self.portal_categories._setCategoryList(self, path_list)
 
-  security.declareProtected( Permissions.View, 'getBaseCategoryList' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getBaseCategoryList')
   def getBaseCategoryList(self):
     """
       Lists the base_category ids which apply to this instance
@@ -2395,7 +2405,8 @@
   security.declareProtected( Permissions.View, 'getBaseCategoryIds' )
   getBaseCategoryIds = getBaseCategoryList
 
-  security.declareProtected( Permissions.View, 'getBaseCategoryValueList' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getBaseCategoryValueList')
   def getBaseCategoryValueList(self):
     return self._getCategoryTool().getBaseCategoryValues(context=self)
 
@@ -3112,7 +3123,8 @@
                                                 cache_factory='erp5_content_short')
     return cached_getAcquireLocalRoles(portal_type=self.getPortalType())
 
-  security.declareProtected(Permissions.View, 'get_local_permissions')
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'get_local_permissions')
   def get_local_permissions(self):
     """
     This works like get_local_roles. It allows to get all
@@ -3727,7 +3739,8 @@
     key = ('default_reindex_parameter', id(aq_base(self)))
     tv[key] = kw
 
-  security.declareProtected(Permissions.View, 'getDefaultReindexParameterDict' )
+  security.declareProtected(Permissions.AccessContentsInformation,
+                            'getDefaultReindexParameterDict')
   def getDefaultReindexParameterDict(self, inherit_placeless=True):
     # This method returns default reindex parameters to self.
     # The result can be either a dict object or None.
@@ -3751,7 +3764,7 @@
         result.update(local)
     return result
 
-  security.declareProtected(Permissions.View, 'isItem' )
+  security.declareProtected(Permissions.AccessContentsInformation, 'isItem')
   def isItem(self):
     return self.portal_type in self.getPortalItemTypeList()
 




More information about the Erp5-report mailing list