diff --git a/nova/policies/quota_sets.py b/nova/policies/quota_sets.py index 9cc46e078c50..d6b6b2873f82 100644 --- a/nova/policies/quota_sets.py +++ b/nova/policies/quota_sets.py @@ -62,7 +62,7 @@ quota_sets_policies = [ ]), base.create_rule_default( POLICY_ROOT % 'detail', - base.RULE_ADMIN_API, + base.RULE_ADMIN_OR_OWNER, "Show the detail of quota", [ { diff --git a/nova/tests/unit/test_policy.py b/nova/tests/unit/test_policy.py index ad671cfedd55..337d2efd681d 100644 --- a/nova/tests/unit/test_policy.py +++ b/nova/tests/unit/test_policy.py @@ -356,7 +356,6 @@ class RealRolePolicyTestCase(test.NoDBTestCase): "os_compute_api:os-networks-associate", "os_compute_api:os-quota-sets:update", "os_compute_api:os-quota-sets:delete", -"os_compute_api:os-quota-sets:detail", "os_compute_api:os-security-group-default-rules", "os_compute_api:os-server-diagnostics", "os_compute_api:os-services", @@ -391,6 +390,7 @@ class RealRolePolicyTestCase(test.NoDBTestCase): "os_compute_api:os-pause-server:pause", "os_compute_api:os-pause-server:unpause", "os_compute_api:os-quota-sets:show", +"os_compute_api:os-quota-sets:detail", "os_compute_api:server-metadata:index", "os_compute_api:server-metadata:show", "os_compute_api:server-metadata:delete", diff --git a/releasenotes/notes/quota-show-detail-access-d6f37282d288fa33.yaml b/releasenotes/notes/quota-show-detail-access-d6f37282d288fa33.yaml new file mode 100644 index 000000000000..48791011e735 --- /dev/null +++ b/releasenotes/notes/quota-show-detail-access-d6f37282d288fa33.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - The default policy for os_compute_api:os-quota-sets:detail has + been changed to permit listing of quotas with details to project + users, not only to admins.