28 lines
996 B
Diff
28 lines
996 B
Diff
From ff48b415941e51f02ba7f9377ba3f9225721bfe1 Mon Sep 17 00:00:00 2001
|
|
From: Kristine Bujold <kristine.bujold@windriver.com>
|
|
Date: Wed, 6 Jun 2018 07:53:59 -0400
|
|
Subject: [PATCH 1/1] Fix horizon user session timeout
|
|
|
|
---
|
|
openstack_auth/views.py | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/openstack_auth/views.py b/openstack_auth/views.py
|
|
index ad339c4..a680abf 100644
|
|
--- a/openstack_auth/views.py
|
|
+++ b/openstack_auth/views.py
|
|
@@ -122,6 +122,10 @@ def login(request, template_name=None, extra_context=None, **kwargs):
|
|
region_name = regions.get(login_region)
|
|
request.session['region_endpoint'] = region
|
|
request.session['region_name'] = region_name
|
|
+
|
|
+ # Adding the user's last_login to the session
|
|
+ request.session['_user_login'] = request.user.last_login
|
|
+
|
|
expiration_time = request.user.time_until_expiration()
|
|
threshold_days = getattr(
|
|
settings, 'PASSWORD_EXPIRES_WARNING_THRESHOLD_DAYS', -1)
|
|
--
|
|
1.8.3.1
|
|
|