Fix Share Network Subnet Metadata policy error
When the user logged is not an admin, the project find for the policies using some information like project_id. Since the Subnet model doesn't have project_id, the new property refering the Share Network project_id now is used to guarantee access Closes-bug: #2011869 Change-Id: I58331fa6906c855804abb94fad85a8370625c886
This commit is contained in:
parent
f03e84ae62
commit
1a603682ae
@ -1066,6 +1066,10 @@ class ShareNetworkSubnet(BASE, ManilaBase):
|
||||
metadata_dict[meta['key']] = meta['value']
|
||||
return metadata_dict
|
||||
|
||||
@property
|
||||
def project_id(self):
|
||||
return self.share_network['project_id']
|
||||
|
||||
|
||||
class ShareNetworkSubnetMetadata(BASE, ManilaBase):
|
||||
"""Represents a metadata key/value pair for a subnet."""
|
||||
|
@ -0,0 +1,6 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Share Network Subnet Metadata now can be add by any user, as the
|
||||
project_id used to verify the policy in the case of a non-admin user
|
||||
now is present in the Share Network Subnet db model.
|
Loading…
Reference in New Issue
Block a user