summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVishvananda Ishaya <vishvananda@gmail.com>2013-02-11 10:06:36 -0800
committerVishvananda Ishaya <vishvananda@gmail.com>2013-02-11 10:06:36 -0800
commit394713eaef63f28f5ea298aeac4ae1f7c76fa167 (patch)
tree7cd0bf69867c58cbe4f16d929282820e5f06fdce
parent3e4637e8e7887567ac7dbc60e997aa780f029c1c (diff)
downloadnova-394713eaef63f28f5ea298aeac4ae1f7c76fa167.tar.gz
nova-394713eaef63f28f5ea298aeac4ae1f7c76fa167.tar.xz
nova-394713eaef63f28f5ea298aeac4ae1f7c76fa167.zip
Fix regression in non-admin simple_usage:show.
Commit 6ff32210772a67a1b526d9d784030afc90f3ce99 optimized the db query for usage but replaced a call that had require_context with one that had require_admin_context. This causes usage show to throw a 403. We check for admin_or_owner in policy, so there is no need to check for admin context at the db layer. Fixes bug 1122267 Change-Id: Iff362f46d83a710f3883538bcb646e3457e0ba64
-rw-r--r--nova/db/sqlalchemy/api.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/db/sqlalchemy/api.py b/nova/db/sqlalchemy/api.py
index d0a58e44f..ce56bedf5 100644
--- a/nova/db/sqlalchemy/api.py
+++ b/nova/db/sqlalchemy/api.py
@@ -1656,7 +1656,7 @@ def regex_filter(query, model, filters):
return query
-@require_admin_context
+@require_context
def instance_get_active_by_window_joined(context, begin, end=None,
project_id=None, host=None):
"""Return instances and joins that were active during window."""