Commit 8447b654 authored by Ivan Tyagov's avatar Ivan Tyagov

Moved from ERP5Wizard as it'ss quite general.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25690 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0895ee7b
......@@ -2762,3 +2762,19 @@ class sha(GenericSum):
allow_class(sha)
#####################################################
# Security
#####################################################
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
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