Merge "[S-RBAC] Allow network owners to get ports from that network"

This commit is contained in:
Zuul 2023-04-14 12:02:22 +00:00 committed by Gerrit Code Review
commit c383bd3c1b
2 changed files with 4 additions and 0 deletions

View File

@ -276,6 +276,7 @@ rules = [
check_str=neutron_policy.policy_or(
base.ADMIN,
neutron_policy.RULE_ADVSVC,
base.RULE_NET_OWNER,
base.PROJECT_READER
),
scope_types=['project'],

View File

@ -903,6 +903,9 @@ class TestMl2DbOperationBounds(test_plugin.DbOperationBoundMixin,
def setUp(self):
super(TestMl2DbOperationBounds, self).setUp()
self.kwargs = self.get_api_kwargs()
# NOTE(slaweq): In this class we are not testing any operations related
# to policy module so we don't need to checu policies
mock.patch('neutron.policy.check').start()
def make_network(self):
return self._make_network(self.fmt, 'name', True, **self.kwargs)