Merge "Do not redirect to the /identity tab admin users on login."

This commit is contained in:
Zuul 2018-06-26 10:59:14 +00:00 committed by Gerrit Code Review
commit 02ab4754d8
2 changed files with 7 additions and 16 deletions

View File

@ -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()

View File

@ -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>`_]