Commit 0895ee7b authored by Ivan Tyagov's avatar Ivan Tyagov

Moved to ERP5Type.Utils


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25689 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cec04303
......@@ -38,7 +38,8 @@ from zLOG import LOG, INFO, WARNING, ERROR, DEBUG
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
......@@ -84,19 +85,6 @@ def _getAcCookieFromServer(url, opener, cookiejar, username, password, header_di
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. """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment