]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix incorrect authorization rule in quota contrib api.
authorNikolay Sobolevskiy <nsobolevsky@mirantis.com>
Thu, 30 May 2013 19:21:09 +0000 (23:21 +0400)
committerGerrit Code Review <review@openstack.org>
Fri, 31 May 2013 04:48:24 +0000 (04:48 +0000)
Incorrect policy and authorization extension name in
 contrib quota api. Legacy from nova.

Change-Id: Ida8262ad63d6f881dd50a385a9913c2ed57b441c
Fixes: bug #1185974
cinder/api/contrib/quotas.py
etc/cinder/policy.json

index 374eed1803cc64d5862aa6b82222eeafc5b446dd..81d51ce55e382479e26b2fed94bc6c3b7324bf6a 100644 (file)
@@ -29,8 +29,8 @@ from cinder import quota
 QUOTAS = quota.QUOTAS
 
 
-authorize_update = extensions.extension_authorizer('compute', 'quotas:update')
-authorize_show = extensions.extension_authorizer('compute', 'quotas:show')
+authorize_update = extensions.extension_authorizer('volume', 'quotas:update')
+authorize_show = extensions.extension_authorizer('volume', 'quotas:show')
 
 
 class QuotaTemplate(xmlutil.TemplateBuilder):
@@ -111,7 +111,7 @@ class Quotas(extensions.ExtensionDescriptor):
 
     name = "Quotas"
     alias = "os-quota-sets"
-    namespace = "http://docs.openstack.org/compute/ext/quotas-sets/api/v1.1"
+    namespace = "http://docs.openstack.org/volume/ext/quotas-sets/api/v1.1"
     updated = "2011-08-08T00:00:00+00:00"
 
     def get_resources(self):
index a4fd911f30f6abef818baf2aea1a5700d0169a06..f2bcc1b1c19b98bb87fd90054deb41139c2a4ad9 100644 (file)
@@ -17,8 +17,7 @@
     "volume_extension:volume_image_metadata": [],
 
     "volume_extension:quotas:show": [],
-    "volume_extension:quotas:update_for_project": [["rule:admin_api"]],
-    "volume_extension:quotas:update_for_user": [["rule:admin_or_projectadmin"]],
+    "volume_extension:quotas:update": [["rule:admin_api"]],
     "volume_extension:quota_classes": [],
 
     "volume_extension:volume_admin_actions:reset_status": [["rule:admin_api"]],