[Zope3-checkins]
SVN: Zope3/branches/ZopeX3-3.0/src/zope/security/management.py
Merged from trunk
Jim Fulton
jim at zope.com
Fri Jul 23 14:51:14 EDT 2004
Log message for revision 26717:
Merged from trunk
r26683 | jim | 2004-07-22 12:33:27 -0400 (Thu, 22 Jul 2004) | 6 lines
Added a debugging api to restore the last interaction.
This is helpful when doing post-mortem debugging, since the
interaction has been cleared.
Changed:
U Zope3/branches/ZopeX3-3.0/src/zope/security/management.py
-=-
Modified: Zope3/branches/ZopeX3-3.0/src/zope/security/management.py
===================================================================
--- Zope3/branches/ZopeX3-3.0/src/zope/security/management.py 2004-07-23 18:50:21 UTC (rev 26716)
+++ Zope3/branches/ZopeX3-3.0/src/zope/security/management.py 2004-07-23 18:51:14 UTC (rev 26717)
@@ -95,10 +95,14 @@
"""End the current interaction."""
try:
- del thread_local.interaction
+ thread_local.previous_interaction = thread_local.interaction
except AttributeError:
pass
+ else:
+ del thread_local.interaction
+def restoreInteraction():
+ thread_local.interaction = thread_local.previous_interaction
def checkPermission(permission, object, interaction=None):
"""Return whether security policy allows permission on object.
More information about the Zope3-Checkins
mailing list