Skip to content

Commit c092e20

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "[S-RBAC] Fix new policies for FIP PFs APIs" into stable/zed
2 parents fc26b53 + 039caab commit c092e20

File tree

2 files changed

+209
-154
lines changed

2 files changed

+209
-154
lines changed

neutron/conf/policies/floatingip_port_forwarding.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
rules = [
3030
policy.DocumentedRuleDefault(
3131
name='create_floatingip_port_forwarding',
32-
check_str=base.policy_or(
33-
base.ADMIN_OR_PROJECT_MEMBER,
34-
base.RULE_PARENT_OWNER),
32+
check_str=base.ADMIN_OR_PARENT_OWNER_MEMBER,
3533
scope_types=['project'],
3634
description='Create a floating IP port forwarding',
3735
operations=[
@@ -48,9 +46,7 @@
4846
),
4947
policy.DocumentedRuleDefault(
5048
name='get_floatingip_port_forwarding',
51-
check_str=base.policy_or(
52-
base.ADMIN_OR_PROJECT_READER,
53-
base.RULE_PARENT_OWNER),
49+
check_str=base.ADMIN_OR_PARENT_OWNER_READER,
5450
scope_types=['project'],
5551
description='Get a floating IP port forwarding',
5652
operations=[
@@ -71,9 +67,7 @@
7167
),
7268
policy.DocumentedRuleDefault(
7369
name='update_floatingip_port_forwarding',
74-
check_str=base.policy_or(
75-
base.ADMIN_OR_PROJECT_MEMBER,
76-
base.RULE_PARENT_OWNER),
70+
check_str=base.ADMIN_OR_PARENT_OWNER_MEMBER,
7771
scope_types=['project'],
7872
description='Update a floating IP port forwarding',
7973
operations=[
@@ -90,9 +84,7 @@
9084
),
9185
policy.DocumentedRuleDefault(
9286
name='delete_floatingip_port_forwarding',
93-
check_str=base.policy_or(
94-
base.ADMIN_OR_PROJECT_MEMBER,
95-
base.RULE_PARENT_OWNER),
87+
check_str=base.ADMIN_OR_PARENT_OWNER_MEMBER,
9688
scope_types=['project'],
9789
description='Delete a floating IP port forwarding',
9890
operations=[

0 commit comments

Comments
 (0)