Skip to content

Commit

Permalink
Fix incorrect authorization rule in quota contrib api.
Browse files Browse the repository at this point in the history
Incorrect policy and authorization extension name in
 contrib quota api. Legacy from nova.

Change-Id: Ida8262ad63d6f881dd50a385a9913c2ed57b441c
Fixes: bug #1185974
  • Loading branch information
Nikolay Sobolevskiy authored and openstack-gerrit committed May 31, 2013
1 parent d1e7c9a commit f7d4210
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cinder/api/contrib/quotas.py
Expand Up @@ -29,8 +29,8 @@
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):
Expand Down Expand Up @@ -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):
Expand Down
3 changes: 1 addition & 2 deletions etc/cinder/policy.json
Expand Up @@ -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"]],
Expand Down

0 comments on commit f7d4210

Please sign in to comment.