From f7d4210d7c6c4c2f6f78f24d1681a110f49550d4 Mon Sep 17 00:00:00 2001 From: Nikolay Sobolevskiy Date: Thu, 30 May 2013 23:21:09 +0400 Subject: [PATCH] Fix incorrect authorization rule in quota contrib api. Incorrect policy and authorization extension name in contrib quota api. Legacy from nova. Change-Id: Ida8262ad63d6f881dd50a385a9913c2ed57b441c Fixes: bug #1185974 --- cinder/api/contrib/quotas.py | 6 +++--- etc/cinder/policy.json | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/cinder/api/contrib/quotas.py b/cinder/api/contrib/quotas.py index 374eed180..81d51ce55 100644 --- a/cinder/api/contrib/quotas.py +++ b/cinder/api/contrib/quotas.py @@ -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): diff --git a/etc/cinder/policy.json b/etc/cinder/policy.json index a4fd911f3..f2bcc1b1c 100644 --- a/etc/cinder/policy.json +++ b/etc/cinder/policy.json @@ -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"]], -- 2.45.2