Merge "Use elevated context when getting default SG for tenant"
This commit is contained in:
commit
4b35811b0d
|
@ -910,8 +910,11 @@ class SecurityGroupDbMixin(ext_sg.SecurityGroupPluginBase,
|
|||
security_groups else [])
|
||||
|
||||
def _get_default_sg_id(self, context, tenant_id):
|
||||
# NOTE(slaweq): With new system/project scopes it may happen that
|
||||
# project admin will try to find default SG for different
|
||||
# project. In such case elevated context needs to be used.
|
||||
default_group = sg_obj.DefaultSecurityGroup.get_object(
|
||||
context,
|
||||
context.elevated(),
|
||||
project_id=tenant_id,
|
||||
)
|
||||
if default_group:
|
||||
|
|
Loading…
Reference in New Issue