Merge "Add correct policy for some actions"
This commit is contained in:
commit
b88dfb785b
|
@ -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