diff --git a/neutron/conf/policies/qos.py b/neutron/conf/policies/qos.py index 96362fe5f5e..b06b5af6b62 100644 --- a/neutron/conf/policies/qos.py +++ b/neutron/conf/policies/qos.py @@ -103,7 +103,11 @@ policy.DocumentedRuleDefault( name='get_rule_type', - check_str=base.ADMIN, + # NOTE(ralonsoh): it can't be ADMIN_OR_PROJECT_READER constant from the + # base module because that is using "project_id" in the check string + # and the rule type resource don't belongs to any project thus such + # check string would fail enforcement. + check_str='role:reader', scope_types=['project'], description='Get available QoS rule types', operations=[ diff --git a/neutron/tests/unit/conf/policies/test_qos.py b/neutron/tests/unit/conf/policies/test_qos.py index 2b4d7aea031..ff655b298e9 100644 --- a/neutron/tests/unit/conf/policies/test_qos.py +++ b/neutron/tests/unit/conf/policies/test_qos.py @@ -210,12 +210,6 @@ def setUp(self): super(ProjectMemberQosRuleTypeTests, self).setUp() self.context = self.project_member_ctx - def test_get_rule_type(self): - self.assertRaises( - base_policy.PolicyNotAuthorized, - policy.enforce, - self.context, 'get_rule_type', self.target) - class ProjectReaderQosRuleTypeTests(ProjectMemberQosRuleTypeTests):