Merge "[S-RBAC] Fix policies for l3_conntrack_helpers" into stable/2025.1
This commit is contained in:
@@ -30,9 +30,7 @@ RESOURCE_PATH = ('/routers/{router_id}'
|
|||||||
rules = [
|
rules = [
|
||||||
policy.DocumentedRuleDefault(
|
policy.DocumentedRuleDefault(
|
||||||
name='create_router_conntrack_helper',
|
name='create_router_conntrack_helper',
|
||||||
check_str=neutron_policy.policy_or(
|
check_str=base.ADMIN_OR_PARENT_OWNER_MEMBER,
|
||||||
base.ADMIN_OR_PROJECT_MEMBER,
|
|
||||||
base.PARENT_OWNER_MEMBER),
|
|
||||||
scope_types=['project'],
|
scope_types=['project'],
|
||||||
description='Create a router conntrack helper',
|
description='Create a router conntrack helper',
|
||||||
operations=[
|
operations=[
|
||||||
@@ -49,9 +47,7 @@ rules = [
|
|||||||
),
|
),
|
||||||
policy.DocumentedRuleDefault(
|
policy.DocumentedRuleDefault(
|
||||||
name='get_router_conntrack_helper',
|
name='get_router_conntrack_helper',
|
||||||
check_str=neutron_policy.policy_or(
|
check_str=base.ADMIN_OR_PARENT_OWNER_READER,
|
||||||
base.ADMIN_OR_PROJECT_READER,
|
|
||||||
base.PARENT_OWNER_READER),
|
|
||||||
scope_types=['project'],
|
scope_types=['project'],
|
||||||
description='Get a router conntrack helper',
|
description='Get a router conntrack helper',
|
||||||
operations=[
|
operations=[
|
||||||
@@ -72,9 +68,7 @@ rules = [
|
|||||||
),
|
),
|
||||||
policy.DocumentedRuleDefault(
|
policy.DocumentedRuleDefault(
|
||||||
name='update_router_conntrack_helper',
|
name='update_router_conntrack_helper',
|
||||||
check_str=neutron_policy.policy_or(
|
check_str=base.ADMIN_OR_PARENT_OWNER_MEMBER,
|
||||||
base.ADMIN_OR_PROJECT_MEMBER,
|
|
||||||
base.PARENT_OWNER_MEMBER),
|
|
||||||
scope_types=['project'],
|
scope_types=['project'],
|
||||||
description='Update a router conntrack helper',
|
description='Update a router conntrack helper',
|
||||||
operations=[
|
operations=[
|
||||||
@@ -91,9 +85,7 @@ rules = [
|
|||||||
),
|
),
|
||||||
policy.DocumentedRuleDefault(
|
policy.DocumentedRuleDefault(
|
||||||
name='delete_router_conntrack_helper',
|
name='delete_router_conntrack_helper',
|
||||||
check_str=neutron_policy.policy_or(
|
check_str=base.ADMIN_OR_PARENT_OWNER_MEMBER,
|
||||||
base.ADMIN_OR_PROJECT_MEMBER,
|
|
||||||
base.PARENT_OWNER_MEMBER),
|
|
||||||
scope_types=['project'],
|
scope_types=['project'],
|
||||||
description='Delete a router conntrack helper',
|
description='Delete a router conntrack helper',
|
||||||
operations=[
|
operations=[
|
||||||
|
|||||||
@@ -28,17 +28,17 @@ class L3ConntrackHelperAPITestCase(base.PolicyBaseTestCase):
|
|||||||
super().setUp()
|
super().setUp()
|
||||||
self.router = {
|
self.router = {
|
||||||
'id': uuidutils.generate_uuid(),
|
'id': uuidutils.generate_uuid(),
|
||||||
|
'tenant_id': self.project_id,
|
||||||
'project_id': self.project_id}
|
'project_id': self.project_id}
|
||||||
self.alt_router = {
|
self.alt_router = {
|
||||||
'id': uuidutils.generate_uuid(),
|
'id': uuidutils.generate_uuid(),
|
||||||
|
'tenant_id': self.alt_project_id,
|
||||||
'project_id': self.alt_project_id}
|
'project_id': self.alt_project_id}
|
||||||
|
|
||||||
self.target = {
|
self.target = {
|
||||||
'project_id': self.project_id,
|
|
||||||
'router_id': self.router['id'],
|
'router_id': self.router['id'],
|
||||||
'ext_parent_router_id': self.router['id']}
|
'ext_parent_router_id': self.router['id']}
|
||||||
self.alt_target = {
|
self.alt_target = {
|
||||||
'project_id': self.alt_project_id,
|
|
||||||
'router_id': self.alt_router['id'],
|
'router_id': self.alt_router['id'],
|
||||||
'ext_parent_router_id': self.alt_router['id']}
|
'ext_parent_router_id': self.alt_router['id']}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user