[Erp5-report] r39464 yo - /erp5/trunk/products/ERP5Type/ERP5Type.py

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 22 09:41:05 CEST 2010


Author: yo
Date: Fri Oct 22 09:41:03 2010
New Revision: 39464

URL: http://svn.erp5.org?rev=39464&view=rev
Log:
Define getTypeMixinList and getTypeInterfaceList as well explicitly.

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

Modified: erp5/trunk/products/ERP5Type/ERP5Type.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Type/ERP5Type.py?rev=39464&r1=39463&r2=39464&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] (original)
+++ erp5/trunk/products/ERP5Type/ERP5Type.py [utf8] Fri Oct 22 09:41:03 2010
@@ -423,11 +423,26 @@ class ERP5TypeInformation(XMLObject,
       """Getter for 'type_base_category' property"""
       return list(self.base_category_list)
 
-    # XXX this is required for a bootstrap issue.
+    # XXX these methods, _baseGetTypeClass, getTypeMixinList, and
+    # getTypeInterfaceList, are required for a bootstrap issue that
+    # the portal type class Base Type is required for _aq_dynamic on
+    # Base Type. So surpress calling _aq_dynamic when obtaining information
+    # required for generating a portal type class by declaring these methods
+    # explicitly.
     def _baseGetTypeClass(self):
       return getattr(aq_base(self), 'type_class', None)
 
     security.declareProtected(Permissions.AccessContentsInformation,
+                              'getTypeMixinList')
+    def getTypeMixinList(self):
+      return getattr(aq_base(self), 'type_mixin', ())
+
+    security.declareProtected(Permissions.AccessContentsInformation,
+                              'getTypeInterfaceList')
+    def getTypeInterfaceList(self):
+      return getattr(aq_base(self), 'type_interface', ())
+
+    security.declareProtected(Permissions.AccessContentsInformation,
                               'getTypeClass')
     def getTypeClass(self):
       """Getter for type_class"""




More information about the Erp5-report mailing list