Fix logout bug

* larpe/saml2.ptl: there is not always a cookie attribute in session
   and the recuperation of the user object was wrong

git-svn-id: svn+ssh://labs.libre-entreprise.org/svnroot/larpe@484 3ed937ae-f919-0410-9a43-8e6f19e4ba6e
This commit is contained in:
jschneider 2009-09-30 17:02:36 +00:00
parent 396bcbfe85
commit f85cca1257
1 changed files with 4 additions and 2 deletions

View File

@ -403,8 +403,10 @@ class Saml2(Saml2Directory):
and ( not session_index
or session2.lasso_session_indexes.get(providerId) == session_index):
if session2.users.has_key(providerId):
# try a local logout
site_authentication.get_site_authentication(Host.get_host_from_url()).local_logout(user=session2.users[providerId], cookies=getattr(session2,'cookies'))
# local logout
site_auth = site_authentication.get_site_authentication(Host.get_host_from_url())
site_auth.local_logout(user=session2.get_user(providerId),
cookies=getattr(session2,'cookies', None))
del session2.users[providerId]
if session2.lasso_session_dumps.has_key(providerId):
del session2.lasso_session_dumps[providerId]