Commit 10a8aafd authored by Jérome Perrin's avatar Jérome Perrin

web_renderjs_ui: support logout with google/facebook logins

These authentications are using a different cookie.
parent 5f263ce3
""" """
Default logout handler, overwritten to give website specific portal status message. Default logout handler, overwritten to give website specific portal status message.
""" """
portal = context.getPortalObject()
REQUEST = context.REQUEST REQUEST = context.REQUEST
if REQUEST.has_key('portal_skin'): if REQUEST.has_key('portal_skin'):
context.portal_skins.clearSkinCookie() portal.portal_skins.clearSkinCookie()
REQUEST.RESPONSE.expireCookie('__ac', path='/') REQUEST.RESPONSE.expireCookie('__ac', path='/')
if getattr(portal.portal_skins, "erp5_oauth_google_login", None):
REQUEST.RESPONSE.expireCookie('__ac_google_hash', path='/')
if getattr(portal.portal_skins, "erp5_oauth_facebook_login", None):
REQUEST.RESPONSE.expireCookie('__ac_facebook_hash', path='/')
REQUEST.RESPONSE.setHeader('Location', came_from or context.getPermanentURL(context)) REQUEST.RESPONSE.setHeader('Location', came_from or context.getPermanentURL(context))
REQUEST.RESPONSE.setStatus(303) REQUEST.RESPONSE.setStatus(303)
# REQUEST.RESPONSE.redirect(came_from or context.getPermanentURL(context)); # REQUEST.RESPONSE.redirect(came_from or context.getPermanentURL(context));
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