On 26 Oct 2003 at 18:33, Dieter Maurer wrote:
Brad Clements wrote at 2003-10-26 11:39 -0500:
I want to be able to 'su' as another user within Zope if a PythonScript is called with valid REQUEST.form values.
Attached below is my extension method, which sorta works. The problem is that after I call newSecurityManager, the 'new user' doesn't have View rights to the User object, so calling getProperty() on it fails. I'm using LDAPUserFolder .... newUser = newUser.__of__(getattr(userFolder,'aq_base', userFolder))
Try "newUser= newUser.__of__(userFolder)".
I am not sure, it will work but at least it is more correct than your version.
I had tried that first, it didn't work either. I thought maybe I had to unwrap the user folder acquired through the context object, that's why I added the getattr cruft. In any case, newUser= newUser.__of__(userFolder) produces the same results Thanks for trying to help! -- Brad Clements, bkc@murkworks.com (315)268-1000 http://www.murkworks.com (315)268-9812 Fax http://www.wecanstopspam.org/ AOL-IM: BKClements