Add correct policy for some actions
This patch correct the wrong policy for add allowed address pair and add policy for delete allowed address pair. Closes-Bug: #1702804 Change-Id: Idb47a924fbf659459c6537f32dc2ad378e436255
This commit is contained in:
parent
e9e1605c3d
commit
95c0109f2a
|
@ -36,7 +36,10 @@ class AddAllowedAddressPair(policy.PolicyTargetMixin, tables.LinkAction):
|
|||
url = "horizon:project:networks:ports:addallowedaddresspairs"
|
||||
classes = ("ajax-modal",)
|
||||
icon = "plus"
|
||||
policy_rules = (("network", "update_port"),)
|
||||
policy_rules = (
|
||||
("network", "update_port"),
|
||||
("network", "update_port:allowed_address_pairs"),
|
||||
)
|
||||
|
||||
def get_link_url(self, port=None):
|
||||
if port:
|
||||
|
@ -62,6 +65,11 @@ class DeleteAllowedAddressPair(tables.DeleteAction):
|
|||
count
|
||||
)
|
||||
|
||||
policy_rules = (
|
||||
("network", "update_port"),
|
||||
("network", "update_port:allowed_address_pairs"),
|
||||
)
|
||||
|
||||
def delete(self, request, ip_address):
|
||||
try:
|
||||
port_id = self.table.kwargs['port_id']
|
||||
|
|
Loading…
Reference in New Issue