Do not redirect to the /identity tab admin users on login.
The /identity url may have more resources than project page so it loads slowly. We can improve user experience by setting different login url. Change-Id: I6ce91974d101d80e9685826dc4e6a6495e6a5da3 Closes-Bug: #1778006
This commit is contained in:
parent
0bfe3e3de4
commit
9b6b559eca
|
@ -25,7 +25,6 @@ from django.views.generic import TemplateView
|
|||
from six.moves import urllib
|
||||
|
||||
import horizon
|
||||
from horizon import base
|
||||
from horizon import exceptions
|
||||
from horizon import notifications
|
||||
|
||||
|
@ -36,21 +35,7 @@ MESSAGES_PATH = getattr(settings, 'MESSAGES_PATH', None)
|
|||
|
||||
|
||||
def get_user_home(user):
|
||||
try:
|
||||
token = user.token
|
||||
except AttributeError:
|
||||
raise exceptions.NotAuthenticated()
|
||||
# Domain Admin, Project Admin will default to identity
|
||||
dashboard = None
|
||||
if token.project.get('id') is None or user.is_superuser:
|
||||
try:
|
||||
dashboard = horizon.get_dashboard('identity')
|
||||
except base.NotRegistered:
|
||||
pass
|
||||
|
||||
if dashboard is None:
|
||||
dashboard = horizon.get_default_dashboard()
|
||||
|
||||
dashboard = horizon.get_default_dashboard()
|
||||
return dashboard.get_absolute_url()
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Do not redirect to the /identity tab admin users on login. Now `user_home`
|
||||
config options works in the same way for all users.
|
||||
[`bug/1778006 <https://bugs.launchpad.net/horizon/1778006>`_]
|
Loading…
Reference in New Issue