[Erp5-report] r25689 - /erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Feb 25 10:08:42 CET 2009


Author: ivan
Date: Wed Feb 25 10:08:41 2009
New Revision: 25689

URL: http://svn.erp5.org?rev=25689&view=rev
Log:
Moved to ERP5Type.Utils

Modified:
    erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py

Modified: erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py?rev=25689&r1=25688&r2=25689&view=diff
==============================================================================
--- erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py [utf8] (original)
+++ erp5/trunk/products/ERP5Wizard/Tool/WizardTool.py [utf8] Wed Feb 25 10:08:41 2009
@@ -38,7 +38,8 @@
 from cStringIO import StringIO
 from UserDict import UserDict
 import xmlrpclib, socket, sys, traceback, urllib, urllib2, base64, cgi
-from AccessControl.SecurityManagement import newSecurityManager, getSecurityManager, setSecurityManager
+from AccessControl.SecurityManagement import setSecurityManager
+from Products.ERP5Type.Utils import _setSuperSecurityManager
 import zLOG, cookielib
 from urlparse import urlparse, urlunparse
 from base64 import encodestring, decodestring
@@ -83,19 +84,6 @@
   request = urllib2.Request(url, data, header_dict)
   f = opener.open(request)
   return f
-
-def _setSuperSecurityManager(self, user_name=None):
-  """ Change to super user account or passed user_name.
-      Return original Security Manager
-  """
-  original_security_manager = getSecurityManager()
-  if user_name is not None:
-    user_folder = self.getPortalObject().acl_users
-    user = user_folder.getUserById(user_name).__of__(user_folder)
-  else:
-    user = self.getWrappedOwner()
-  newSecurityManager(self.REQUEST, user)
-  return original_security_manager
 
 class GeneratorCall(UserDict):
   """ Class use to generate/interpret XML-RPC call for the wizard. """




More information about the Erp5-report mailing list