From a11aa7ff62c15d7bf15367106f933ef0ae5d4521 Mon Sep 17 00:00:00 2001 From: Marek Date: Fri, 20 Sep 2019 09:46:03 +0200 Subject: [PATCH] Forwards LOGOUT_URL to templates. Uses the openstack context preprocessor to pass the LOGOUT_URL from settings to templates and changes the 'Sign out' menu entry to redirect to it instead of the logout view directly. closes-bug: #1747149 Change-Id: Id17ffca6b5e24779433c3f19d009bb2a77f7b901 --- openstack_dashboard/context_processors.py | 1 + openstack_dashboard/templates/header/_user_menu.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/openstack_dashboard/context_processors.py b/openstack_dashboard/context_processors.py index 676e335e21..faf5afbd2a 100644 --- a/openstack_dashboard/context_processors.py +++ b/openstack_dashboard/context_processors.py @@ -87,6 +87,7 @@ def openstack(request): context['WEBROOT'] = settings.WEBROOT context['USER_MENU_LINKS'] = settings.USER_MENU_LINKS + context['LOGOUT_URL'] = settings.LOGOUT_URL # Adding profiler support flag profiler_settings = settings.OPENSTACK_PROFILER diff --git a/openstack_dashboard/templates/header/_user_menu.html b/openstack_dashboard/templates/header/_user_menu.html index 66c0cacc74..6cc26ca8ca 100644 --- a/openstack_dashboard/templates/header/_user_menu.html +++ b/openstack_dashboard/templates/header/_user_menu.html @@ -59,7 +59,7 @@ {% endif %}
  • - + {% trans "Sign Out" %}