Commit aa09b9ca authored by Hanno Schlichting's avatar Hanno Schlichting

Backport the robustness improvements related to Products.Zope_Hotfix_20111024

parent 7a240912
...@@ -41,8 +41,13 @@ ...@@ -41,8 +41,13 @@
import sys import sys
from logging import getLogger from logging import getLogger
from App.class_init import InitializeClass
from AccessControl.ImplPython import _what_not_even_god_should_do from AccessControl.ImplPython import _what_not_even_god_should_do
from Acquisition import Implicit from Acquisition import Implicit
from Persistence import Persistent
# always patch Persistent before ClassSecurityInfo is used
Persistent.__class_init__ = InitializeClass
LOG = getLogger('SecurityInfo') LOG = getLogger('SecurityInfo')
...@@ -311,5 +316,4 @@ def allow_class(Class): ...@@ -311,5 +316,4 @@ def allow_class(Class):
sec.declareObjectPublic() sec.declareObjectPublic()
sec.setDefaultAccess(1) sec.setDefaultAccess(1)
sec.apply(Class) sec.apply(Class)
from App.class_init import InitializeClass
InitializeClass(Class) InitializeClass(Class)
...@@ -42,9 +42,7 @@ def patchPersistent(): ...@@ -42,9 +42,7 @@ def patchPersistent():
from zope.interface import classImplements from zope.interface import classImplements
from Persistence import Persistent from Persistence import Persistent
from App.class_init import default__class_init__
from App.interfaces import IPersistentExtra from App.interfaces import IPersistentExtra
Persistent.__class_init__ = default__class_init__
for k, v in PersistentUtil.__dict__.items(): for k, v in PersistentUtil.__dict__.items():
if k[0] != '_': if k[0] != '_':
......
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