Merge "Pass the actual target in quota class policy"
This commit is contained in:
@@ -93,7 +93,7 @@ class QuotaClassSetsController(wsgi.Controller):
|
||||
def _show(self, req, id, filtered_quotas=None,
|
||||
exclude_server_groups=False):
|
||||
context = req.environ['nova.context']
|
||||
context.can(qcs_policies.POLICY_ROOT % 'show', {'quota_class': id})
|
||||
context.can(qcs_policies.POLICY_ROOT % 'show', target={})
|
||||
values = QUOTAS.get_class_quotas(context, id)
|
||||
return self._format_quota_set(id, values, filtered_quotas,
|
||||
exclude_server_groups)
|
||||
@@ -119,7 +119,7 @@ class QuotaClassSetsController(wsgi.Controller):
|
||||
def _update(self, req, id, body, filtered_quotas=None,
|
||||
exclude_server_groups=False):
|
||||
context = req.environ['nova.context']
|
||||
context.can(qcs_policies.POLICY_ROOT % 'update', {'quota_class': id})
|
||||
context.can(qcs_policies.POLICY_ROOT % 'update', target={})
|
||||
try:
|
||||
utils.check_string_length(id, 'quota_class_name',
|
||||
min_length=1, max_length=255)
|
||||
|
||||
Reference in New Issue
Block a user