[Checkins] SVN: Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py - ported revision 24386 from PythonScript to FSPythonScript:

Yvo Schubbe y.2009 at wcm-solutions.de
Mon Jul 27 03:31:55 EDT 2009


Log message for revision 102325:
  - ported revision 24386 from PythonScript to FSPythonScript:
    Remove code which pushes script onto the execution stack, since it is now done in the Binding base class.

Changed:
  U   Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py

-=-
Modified: Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py
===================================================================
--- Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py	2009-07-27 07:14:42 UTC (rev 102324)
+++ Products.CMFCore/trunk/Products/CMFCore/FSPythonScript.py	2009-07-27 07:31:54 UTC (rev 102325)
@@ -19,7 +19,6 @@
 import new
 
 from AccessControl.SecurityInfo import ClassSecurityInfo
-from AccessControl.SecurityManagement import getSecurityManager
 from Acquisition import aq_parent
 from App.class_init import InitializeClass
 from App.special_dtml import DTMLFile
@@ -190,18 +189,13 @@
         else:
             f = new.function(f.func_code, g, f.func_name)
 
-        # Execute the function in a new security context.
-        security=getSecurityManager()
-        security.addContext(self)
-        try:
-            result = f(*args, **kw)
-            if keyset is not None:
-                # Store the result in the cache.
-                self.ZCacheable_set(result, keywords=keyset)
-            return result
-        finally:
-            security.removeContext(self)
+        result = f(*args, **kw)
 
+        if keyset is not None:
+            # Store the result in the cache.
+            self.ZCacheable_set(result, keywords=keyset)
+        return result
+
     security.declareProtected(ViewManagementScreens, 'getModTime')
     # getModTime defined in FSObject
 



More information about the Checkins mailing list