Commit f52153c1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

getConfigurationPropertyDict() returns dict instead of PersistentMapping...

getConfigurationPropertyDict() returns dict instead of PersistentMapping itself, that allows accessing the inside value in restricted environments.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31837 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eed261b8
......@@ -53,20 +53,23 @@ class ConfigurableMixin:
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
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