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:
parent
3bce40ed76
commit
852d63c2f0
|
@ -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
|
||||
SystemController endpoint in the Django Session at the time of login
|
||||
---
|
||||
openstack_auth/forms.py | 4 +--
|
||||
openstack_auth/user.py | 8 ++++-
|
||||
openstack_auth/utils.py | 47 ++++++++++++++++++++++++-----
|
||||
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
|
||||
index f486bfa..39e3e34 100644
|
||||
--- a/openstack_auth/user.py
|
||||
|
|
|
@ -85,7 +85,7 @@ index a680abf..0b1351d 100644
|
|||
|
||||
if not region_auth_url:
|
||||
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:
|
||||
request.user = auth.authenticate(
|
||||
request=request, auth_url=unscoped_auth.auth_url,
|
||||
|
|
Loading…
Reference in New Issue