summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorqiaomin <chen.qiaomin@99cloud.net>2017-07-06 14:31:45 +0800
committerAllen <chen.qiaomin@99cloud.net>2017-07-19 02:11:19 +0000
commit088538914f0a2607f09f8a725b8673bb3fccd161 (patch)
tree626450c05602bba9f87284e4b352a3a5513223cc
parenteb3a1a1ede3e8c90f704890499193fb3d7c9c439 (diff)
downloadhorizon-088538914f0a2607f09f8a725b8673bb3fccd161.tar.gz
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 (cherry picked from commit 95c0109f2a2dc318c27c35f92f3f948cdab7709c)
-rw-r--r--openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py
index 461f97772..2b609edb9 100644
--- a/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py
+++ b/openstack_dashboard/dashboards/project/networks/ports/extensions/allowed_address_pairs/tables.py
@@ -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']