context processor: adapt to use existing logout URL for w.c.s. (#62723)
This commit is contained in:
parent
c0780646e6
commit
120723aeab
|
@ -197,13 +197,15 @@ def user_urls(request):
|
|||
|
||||
pub = get_publisher()
|
||||
template_vars = (pub and pub.get_substitution_variables()) or {}
|
||||
logout_url = '/logout?'
|
||||
else:
|
||||
template_vars = getattr(settings, 'TEMPLATE_VARS', {})
|
||||
logout_url = '/logout/?'
|
||||
full_path = request.get_full_path()
|
||||
query_string = urlencode({'next': full_path})
|
||||
context = {
|
||||
'login_url': '/login/?' + query_string,
|
||||
'logout_url': '/logout/?' + urlencode({'next': '/'}),
|
||||
'logout_url': logout_url + urlencode({'next': '/'}),
|
||||
}
|
||||
absolute_uri = request.build_absolute_uri()
|
||||
if 'idp_account_url' in template_vars:
|
||||
|
|
Loading…
Reference in New Issue