Merge "Treat networks shared by RBAC in same way as shared with all tenants" into stable/queens
This commit is contained in:
commit
532c2f7939
|
@ -350,9 +350,11 @@ class FieldCheck(policy.Check):
|
||||||
"%(target_dict)s",
|
"%(target_dict)s",
|
||||||
{'field': self.field, 'target_dict': target_dict})
|
{'field': self.field, 'target_dict': target_dict})
|
||||||
return
|
return
|
||||||
|
project_id = target_dict.get('project_id')
|
||||||
|
ctx = (context.Context(tenant_id=project_id) if project_id
|
||||||
|
else context.get_admin_context())
|
||||||
plugin = directory.get_plugin()
|
plugin = directory.get_plugin()
|
||||||
network = plugin.get_network(
|
network = plugin.get_network(ctx, target_network_id)
|
||||||
context.get_admin_context(), target_network_id)
|
|
||||||
target_value = network.get(self.field)
|
target_value = network.get(self.field)
|
||||||
if target_value is None:
|
if target_value is None:
|
||||||
LOG.debug("Unable to find requested field: %(field)s in target: "
|
LOG.debug("Unable to find requested field: %(field)s in target: "
|
||||||
|
|
Loading…
Reference in New Issue