forked from shaba/openuds
fixed logout absolute url building on logout
This commit is contained in:
parent
e5e8ad5fbd
commit
739b0c7f81
@ -422,8 +422,7 @@ def webLogout(
|
|||||||
Helper function to clear user related data from session. If this method is not used, the session we be cleaned anyway
|
Helper function to clear user related data from session. If this method is not used, the session we be cleaned anyway
|
||||||
by django in regular basis.
|
by django in regular basis.
|
||||||
"""
|
"""
|
||||||
if exit_url is None:
|
exit_url = exit_url or reverse('page.login')
|
||||||
exit_url = reverse('page.login')
|
|
||||||
try:
|
try:
|
||||||
if request.user:
|
if request.user:
|
||||||
authenticator = request.user.manager.getInstance()
|
authenticator = request.user.manager.getInstance()
|
||||||
@ -446,7 +445,7 @@ def webLogout(
|
|||||||
request.session.flush()
|
request.session.flush()
|
||||||
request.authorized = False
|
request.authorized = False
|
||||||
|
|
||||||
response = HttpResponseRedirect(request.build_absolute_uri(exit_url))
|
response = HttpResponseRedirect(exit_url)
|
||||||
if authenticator:
|
if authenticator:
|
||||||
authenticator.webLogoutHook(username, request, response)
|
authenticator.webLogoutHook(username, request, response)
|
||||||
return response
|
return response
|
||||||
|
Loading…
Reference in New Issue
Block a user