Merge "Fix shared zones missing project ID error"

This commit is contained in:
Zuul 2023-05-10 01:13:51 +00:00 committed by Gerrit Code Review
commit 362f70b4c2
1 changed files with 2 additions and 0 deletions

View File

@ -1211,6 +1211,8 @@ class Service(service.RPCService):
policy.check('share_zone', context, target)
self._is_valid_project_id(context.project_id)
if zone.tenant_id == shared_zone.target_project_id:
raise exceptions.BadRequest(
'Cannot share the zone with the zone owner.')