[Erp5-report] r31837 kazuhiko - /erp5/trunk/products/ERP5/mixin/configurable.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jan 20 14:36:16 CET 2010


Author: kazuhiko
Date: Wed Jan 20 14:36:16 2010
New Revision: 31837

URL: http://svn.erp5.org?rev=31837&view=rev
Log:
getConfigurationPropertyDict() returns dict instead of PersistentMapping itself, that allows accessing the inside value in restricted environments.

Modified:
    erp5/trunk/products/ERP5/mixin/configurable.py

Modified: erp5/trunk/products/ERP5/mixin/configurable.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/mixin/configurable.py?rev=31837&r1=31836&r2=31837&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/mixin/configurable.py [utf8] (original)
+++ erp5/trunk/products/ERP5/mixin/configurable.py [utf8] Wed Jan 20 14:36:16 2010
@@ -53,20 +53,23 @@
   def getConfigurationPropertyIdList(self):
     """
     """
-    return self.getConfigurationPropertyDict().keys()
+    return self._getConfigurationPropertyDict().keys()
 
   security.declareProtected(Permissions.AccessContentsInformation,
                             'getConfigurationPropertyDict')
   def getConfigurationPropertyDict(self):
     """
     """
-    if getattr(aq_base(self), '_configuration_property_dict', None) is None:
-      self._configuration_property_dict = PersistentMapping()
-    return self._configuration_property_dict
+    return dict(self._getConfigurationPropertyDict())
 
   security.declareProtected(Permissions.ModifyPortalContent,
                             'updateConfiguration')
   def updateConfiguration(self, **kw):
     """
     """
-    self.getConfigurationPropertyDict().update(kw)
+    self._getConfigurationPropertyDict().update(kw)
+
+  def _getConfigurationPropertyDict(self):
+    if getattr(aq_base(self), '_configuration_property_dict', None) is None:
+      self._configuration_property_dict = PersistentMapping()
+    return self._configuration_property_dict




More information about the Erp5-report mailing list