Commit aecf72ee authored by Yoshinori Okuji's avatar Yoshinori Okuji

Comment out the line which sets klass.__ac_permissions__ to prop_holder's

__ac_permissions__, because this breaks _aq_dynamic without JP's patch.

getProperty passes the optional argument evaluate only to ERP5PropertyManager.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3545 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4fd68919
...@@ -256,7 +256,9 @@ def initializePortalTypeDynamicProperties(self, klass, ptype): ...@@ -256,7 +256,9 @@ def initializePortalTypeDynamicProperties(self, klass, ptype):
# We can now associate it after initialising security # We can now associate it after initialising security
InitializeClass(prop_holder) InitializeClass(prop_holder)
prop_holder.__propholder__ = prop_holder prop_holder.__propholder__ = prop_holder
klass.__ac_permissions__ = prop_holder.__ac_permissions__ # For now, this line below is commented, because this breaks
# _aq_dynamic without JP's patch to Zope for an unknown reason.
#klass.__ac_permissions__ = prop_holder.__ac_permissions__
Base.aq_portal_type[ptype] = prop_holder Base.aq_portal_type[ptype] = prop_holder
...@@ -675,7 +677,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -675,7 +677,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
return default_value return default_value
security.declareProtected( Permissions.AccessContentsInformation, 'getProperty' ) security.declareProtected( Permissions.AccessContentsInformation, 'getProperty' )
def getProperty(self, key, d=None, **kw): def getProperty(self, key, d=None, evaluate=1, **kw):
""" """
Previous Name: getValue Previous Name: getValue
...@@ -700,7 +702,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -700,7 +702,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
# if callable(value): value = value() # if callable(value): value = value()
# return value # return value
else: else:
return ERP5PropertyManager.getProperty(self, key, d=d, **kw) return ERP5PropertyManager.getProperty(self, key, d=d, evaluate=evaluate, **kw)
security.declareProtected( Permissions.AccessContentsInformation, 'getPropertyList' ) security.declareProtected( Permissions.AccessContentsInformation, 'getPropertyList' )
def getPropertyList(self, key, d=None): def getPropertyList(self, key, d=None):
......
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