# HG changeset patch # User Thierry Florac # Date 1386241088 -3600 # Node ID ffa98c18e90957287dcafd4534f0b503f3880cbe # Parent 56f99c78378277790081ec43858e362175ae65d5 Remove security proxy in ITransactionManager adapter diff -r 56f99c783782 -r ffa98c18e909 src/ztfy/utils/zodb.py --- a/src/ztfy/utils/zodb.py Tue Dec 03 11:47:15 2013 +0100 +++ b/src/ztfy/utils/zodb.py Thu Dec 05 11:58:08 2013 +0100 @@ -36,6 +36,8 @@ from zope.interface import implementer, implements, classProvides from zope.schema import getFieldNames from zope.schema.fieldproperty import FieldProperty +from zope.security.proxy import removeSecurityProxy + # import local packages @@ -122,8 +124,8 @@ @adapter(IPersistent) @implementer(ITransactionManager) def transactionManager(obj): - conn = IConnection(obj) # typically this will be - # zope.app.keyreference.persistent.connectionOfPersistent + conn = IConnection(removeSecurityProxy(obj)) # typically this will be + # zope.app.keyreference.persistent.connectionOfPersistent try: return conn.transaction_manager except AttributeError: