9 Jul
2002
9 Jul
'02
5:10 p.m.
Thierry Florac writes:
I'd like to keep authentication values persistent in a session, so that authentication values can be visible while accessing non protected documents or methods. I tried to do this in a Python script :
request = context.REQUEST session = request['SESSION'] session['AUTHENTICATED_USER'] = request['AUTHENTICATED_USER']
but then I receive an error message : Error Type: UnpickleableError Error Value: Cannot pickle objects "request['AUTHENTICATED_USER']" is a complex object which cannot be stored inside ZODB.
When you want to store the user name, use "request['AUTHENTICATED_USER'].getUserName()". Dieter