diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-02-12 13:31:27 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-02-12 13:31:27 +0000 |
commit | 4df47629ec1421bee6395d9fe5b8b970cd78f2fe (patch) | |
tree | 9a741a6527a8082c3bf47e30dfa85083e01d6d44 /nova/context.py | |
parent | 1e339172694240c120841b7e1d9ba0530cf07ac3 (diff) | |
parent | 1d07c12ecad0ace2caae7baecd9f0f669b62cc35 (diff) | |
download | nova-4df47629ec1421bee6395d9fe5b8b970cd78f2fe.tar.gz nova-4df47629ec1421bee6395d9fe5b8b970cd78f2fe.tar.xz nova-4df47629ec1421bee6395d9fe5b8b970cd78f2fe.zip |
Merge "Allow generic rules in context_is_admin rule in policy."
Diffstat (limited to 'nova/context.py')
-rw-r--r-- | nova/context.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nova/context.py b/nova/context.py index 8731e012d..60fd5b4c0 100644 --- a/nova/context.py +++ b/nova/context.py @@ -65,9 +65,6 @@ class RequestContext(object): self.user_id = user_id self.project_id = project_id self.roles = roles or [] - self.is_admin = is_admin - if self.is_admin is None: - self.is_admin = policy.check_is_admin(self.roles) self.read_deleted = read_deleted self.remote_address = remote_address if not timestamp: @@ -90,7 +87,9 @@ class RequestContext(object): self.quota_class = quota_class self.user_name = user_name self.project_name = project_name - + self.is_admin = is_admin + if self.is_admin is None: + self.is_admin = policy.check_is_admin(self) if overwrite or not hasattr(local.store, 'context'): self.update_store() |