summaryrefslogtreecommitdiff
path: root/openstack_dashboard/utils
diff options
context:
space:
mode:
authorKenji Ishii <ken-ishii@sx.jp.nec.com>2016-01-18 11:16:32 +0900
committerTimur Sufiev <tsufiev@mirantis.com>2016-06-10 07:23:09 +0000
commitcb0d1eaf4670530c34cf00ad2d63fcbb985ea377 (patch)
tree34814e9cf240034411b37b48e9dd0a2b21f5594b /openstack_dashboard/utils
parentfedb991435de9b3763ca3e6e9289fd01b3e27f06 (diff)
downloadhorizon-cb0d1eaf4670530c34cf00ad2d63fcbb985ea377.tar.gz
admin permissions depends on OPENSTACK_KEYSTONE_ADMIN_ROLES
In dashboard or panel, 'openstack.roles.xxx' is used as a permission control. 'xxx' in 'openstack.roles.xxx' is a real role name. At the moment, it is not addressed OPENSTACK_KEYSTONE_ADMIN_ROLES. This patch will address it. Change-Id: Ic7200dfdf403b63ef3210750617ae102b15c02c8 Closes-Bug: #1534409
Diffstat (limited to 'openstack_dashboard/utils')
-rw-r--r--openstack_dashboard/utils/identity.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/openstack_dashboard/utils/identity.py b/openstack_dashboard/utils/identity.py
deleted file mode 100644
index 654e3ff01..000000000
--- a/openstack_dashboard/utils/identity.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-
-from django.conf import settings
-
-from horizon.utils.memoized import memoized # noqa
-
-
-class IdentityMixIn(object):
- @memoized
- def get_admin_roles(self):
- _admin_roles = [role.lower() for role in getattr(
- settings,
- 'OPENSTACK_KEYSTONE_ADMIN_ROLES',
- ['admin'])]
- return _admin_roles