Browse Source

Merge "Fix users/projects list when domain context is changed" into stable/stein

tags/15.2.0
Zuul 2 months ago
parent
commit
780dd0f9e8
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      openstack_dashboard/api/keystone.py

+ 6
- 2
openstack_dashboard/api/keystone.py View File

@@ -163,8 +163,12 @@ def keystoneclient(request, admin=False):
token_id = user.token.id

if is_multi_domain_enabled():
# Cloud Admin, Domain Admin or Mixed Domain Admin
if is_domain_admin(request):
is_domain_context_specified = bool(
request.session.get("domain_context"))

# If user is Cloud Admin, Domain Admin or Mixed Domain Admin and there
# is no domain context specified, use domain scoped token
if is_domain_admin(request) and not is_domain_context_specified:
domain_token = request.session.get('domain_token')
if domain_token:
token_id = getattr(domain_token, 'auth_token', None)

Loading…
Cancel
Save