Fix build failure with python-django-openstack-auth

Story: 2004522
Task: 28420

Change-Id: I7f06994f9e32bb4cdfbd547b065f4f55fb43c40c
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
This commit is contained in:
Shuicheng Lin 2019-01-14 23:09:00 +08:00
parent 3bce40ed76
commit 852d63c2f0
2 changed files with 2 additions and 20 deletions

View File

@ -14,29 +14,11 @@ Central Region, there was no way to go back in Horizon from a subcloud
region to the SystemController region. We achieve this by caching the region to the SystemController region. We achieve this by caching the
SystemController endpoint in the Django Session at the time of login SystemController endpoint in the Django Session at the time of login
--- ---
openstack_auth/forms.py | 4 +--
openstack_auth/user.py | 8 ++++- openstack_auth/user.py | 8 ++++-
openstack_auth/utils.py | 47 ++++++++++++++++++++++++----- openstack_auth/utils.py | 47 ++++++++++++++++++++++++-----
openstack_auth/views.py | 78 ++++++++++++++++++++++++++++++++++++++++++++++++- openstack_auth/views.py | 78 ++++++++++++++++++++++++++++++++++++++++++++++++-
4 files changed, 125 insertions(+), 12 deletions(-) 3 files changed, 123 insertions(+), 10 deletions(-)
diff --git a/openstack_auth/forms.py b/openstack_auth/forms.py
index 90e281b..4834ab2 100644
--- a/openstack_auth/forms.py
+++ b/openstack_auth/forms.py
@@ -154,10 +154,10 @@ class Login(django_auth_forms.AuthenticationForm):
# since this user logged in successfully, clear its
# lockout status
utils.clear_user_lockout(username)
-
+
# handle user login
utils.handle_user_login(username, password)
-
+
except exceptions.KeystoneAuthException as exc:
if getattr(exc,"invalidCredentials", False):
msg = 'Login failed for user "%(username)s", remote address '\
diff --git a/openstack_auth/user.py b/openstack_auth/user.py diff --git a/openstack_auth/user.py b/openstack_auth/user.py
index f486bfa..39e3e34 100644 index f486bfa..39e3e34 100644
--- a/openstack_auth/user.py --- a/openstack_auth/user.py

View File

@ -85,7 +85,7 @@ index a680abf..0b1351d 100644
if not region_auth_url: if not region_auth_url:
msg = _('Cannot switch to subcloud %s, no Identity available ' msg = _('Cannot switch to subcloud %s, no Identity available '
@@ -324,7 +326,8 @@ def switch_region(request, region_name, @@ -320,7 +322,8 @@ def switch_region(request, region_name,
try: try:
request.user = auth.authenticate( request.user = auth.authenticate(
request=request, auth_url=unscoped_auth.auth_url, request=request, auth_url=unscoped_auth.auth_url,