Add variable override for OPENSTACK_KEYSTONE_ADMIN_ROLES

As Horizon treats admins differently and can't discern what roles are
administrative in nature, we have to tell it if there are roles
beyond/besides "admin".

If not overriden by the user, then the default is `['admin']` as seen
in the code:
https://github.com/openstack/horizon/blob/stable/mitaka/openstack_dashboard/utils/identity.py#L20-L25.

Closes-Bug: #1614213

Change-Id: I5e475db52be7d6390a1ab29a08b58fc102e16037
Co-Author: Corey Wright <corey.wright@rackspace.com>
This commit is contained in:
Nolan Brubaker 2016-08-17 17:05:11 -04:00
parent d315af7029
commit c7ebd28341
3 changed files with 14 additions and 0 deletions

View File

@ -252,3 +252,6 @@ horizon_role_project_group: horizon_all
# Set arbitrary horizon configuration options
horizon_config_overrides: {}
horizon_keystone_admin_roles:
- admin

View File

@ -0,0 +1,5 @@
---
features:
- The ``horizon_keystone_admin_roles`` variable is added to support the
``OPENSTACK_KEYSTONE_ADMIN_ROLES`` list in the horizon_local_settings.py
file.

View File

@ -738,3 +738,9 @@ DEFAULT_THEME = '{{ horizon_default_theme }}'
# Set arbitrary horizon configuration options
HORIZON_CONFIG.update({{ horizon_config_overrides }})
OPENSTACK_KEYSTONE_ADMIN_ROLES = [
{% for item in horizon_keystone_admin_roles %}
'{{ item }}',
{% endfor %}
]