Commit 18295e08 authored by Vincent Pelletier's avatar Vincent Pelletier

erp5_auto_logout: Fix /logout url access when not being logged in.

parent b79a0de5
from AccessControl import getSecurityManager from AccessControl import getSecurityManager
portal = context.getPortalObject() portal = context.getPortalObject()
portal.portal_sessions.manage_delObjects( username = getSecurityManager().getUser().getUserName()
portal.Base_getAutoLogoutSessionKey( if username is not None:
username=getSecurityManager().getUser().getUserName(), portal.portal_sessions.manage_delObjects(
portal.Base_getAutoLogoutSessionKey(
username=username,
)
) )
)
REQUEST = portal.REQUEST REQUEST = portal.REQUEST
if REQUEST.has_key('portal_skin'): if REQUEST.has_key('portal_skin'):
portal.portal_skins.clearSkinCookie() portal.portal_skins.clearSkinCookie()
......
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