From 42e0f2972b7c8f3a9d10062f34f2d35add7d9d14 Mon Sep 17 00:00:00 2001 From: gong yong sheng Date: Fri, 21 Aug 2015 14:51:45 +0800 Subject: [PATCH] Add empty policy rule to get_rule_type action Without this empty policy rule, get_rule_type will use default, which will demand admin role or tenant_id in object. but rule_type has no tenant_id in its body. Change-Id: I92b1222fbcdc2efd13ca6f586cfefefc55b59189 Closes-bug: #1487324 --- etc/policy.json | 1 + neutron/tests/etc/policy.json | 1 + 2 files changed, 2 insertions(+) diff --git a/etc/policy.json b/etc/policy.json index ac5a27ee..92071425 100644 --- a/etc/policy.json +++ b/etc/policy.json @@ -186,6 +186,7 @@ "create_policy_bandwidth_limit_rule": "rule:admin_only", "delete_policy_bandwidth_limit_rule": "rule:admin_only", "update_policy_bandwidth_limit_rule": "rule:admin_only", + "get_rule_type": "rule:regular_user", "restrict_wildcard": "(not field:rbac_policy:target_tenant=*) or rule:admin_only", "create_rbac_policy": "", diff --git a/neutron/tests/etc/policy.json b/neutron/tests/etc/policy.json index ac5a27ee..92071425 100644 --- a/neutron/tests/etc/policy.json +++ b/neutron/tests/etc/policy.json @@ -186,6 +186,7 @@ "create_policy_bandwidth_limit_rule": "rule:admin_only", "delete_policy_bandwidth_limit_rule": "rule:admin_only", "update_policy_bandwidth_limit_rule": "rule:admin_only", + "get_rule_type": "rule:regular_user", "restrict_wildcard": "(not field:rbac_policy:target_tenant=*) or rule:admin_only", "create_rbac_policy": "",