[Zope-Checkins] CVS: Zope/lib/python/Products/Transience - Transience.py:1.35

Brian Lloyd brian at zope.com
Wed Jan 21 14:59:10 EST 2004


Update of /cvs-repository/Zope/lib/python/Products/Transience
In directory cvs.zope.org:/tmp/cvs-serv846/Products/Transience

Modified Files:
	Transience.py 
Log Message:
fix sc loss bug


=== Zope/lib/python/Products/Transience/Transience.py 1.34 => 1.35 ===
--- Zope/lib/python/Products/Transience/Transience.py:1.34	Fri Nov 28 11:46:11 2003
+++ Zope/lib/python/Products/Transience/Transience.py	Wed Jan 21 14:59:09 2004
@@ -27,7 +27,8 @@
 from Persistence import Persistent
 from Acquisition import Implicit
 from AccessControl import ClassSecurityInfo, getSecurityManager
-from AccessControl.SecurityManagement import newSecurityManager
+from AccessControl.SecurityManagement import newSecurityManager, \
+     setSecurityManager
 from AccessControl.User import nobody
 from BTrees.OOBTree import OOBTree, OOBucket, OOSet
 from BTrees.IOBTree import IOBTree
@@ -276,8 +277,9 @@
 
         for item in items:
             if callable(method):
+                sm = getSecurityManager()
                 try:
-                    user = getSecurityManager().getUser()
+                    user = sm.getUser()
                     try:
                         newSecurityManager(None, nobody)
                         method(item, self)
@@ -291,7 +293,7 @@
                             error=sys.exc_info()
                             )
                 finally:
-                    newSecurityManager(None, user)
+                    setSecurityManager(sm)
             else:
                 err = '%s in %s attempted to call non-callable %s'
                 path = self.getPhysicalPath()




More information about the Zope-Checkins mailing list