summaryrefslogtreecommitdiffstats
path: root/nova/context.py
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2012-08-20 10:11:34 -0700
committerVishvananda Ishaya <vishvananda@gmail.com>2012-08-20 10:32:06 -0700
commit8378f316454fe74d171a09ce9af91f1da6692c21 (patch)
tree94aacacbd37d9d9fdc4fdc1c4e49103830c3d304 /nova/context.py
parent740e93aae891d6c20f38b091ad9f54d71db0d7f7 (diff)
downloadnova-8378f316454fe74d171a09ce9af91f1da6692c21.tar.gz
nova-8378f316454fe74d171a09ce9af91f1da6692c21.tar.xz
nova-8378f316454fe74d171a09ce9af91f1da6692c21.zip
Fix is_admin check via policy
When we create an admin context internally, we need to make sure that all of the policy actions that are available to that context are still available. This wasn't working in some cases because we were looking for a hard-coded role called 'admin'. Fixes bug 1039093 Change-Id: I939f834a63c9e6e6e7c87b115bd469466da66a69
Diffstat (limited to 'nova/context.py')
-rw-r--r--nova/context.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/context.py b/nova/context.py
index b6fd105eb..74f7a3c23 100644
--- a/nova/context.py
+++ b/nova/context.py
@@ -67,7 +67,7 @@ class RequestContext(object):
self.roles = roles or []
self.is_admin = is_admin
if self.is_admin is None:
- self.is_admin = policy.check_admin_role(self.roles)
+ self.is_admin = policy.check_is_admin(self.roles)
self.read_deleted = read_deleted
self.remote_address = remote_address
if not timestamp: