From 709e0c555e5896f5f2abe16f9ba029010b4f42cc Mon Sep 17 00:00:00 2001 From: Wei Zhou Date: Thu, 10 Dec 2015 14:09:45 +0100 Subject: [PATCH] [UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users --- ui/scripts/vpc.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/ui/scripts/vpc.js b/ui/scripts/vpc.js index 41d10edc73a..4b10d8baeaf 100644 --- a/ui/scripts/vpc.js +++ b/ui/scripts/vpc.js @@ -638,7 +638,7 @@ args.response.success({ _custom: { jobId: jobID, - getUpdateIdtem: function() { + getUpdatedItem: function() { $(window).trigger('cloudStack.fullRefresh'); } }, @@ -1225,12 +1225,19 @@ url: createURL('createNetworkACLList&vpcid=' + args.context.vpc[0].id), data: data, success: function(json) { - var items = json.createnetworkacllistresponse; args.response.success({ - data: items + _custom: { + jobId: json.createnetworkacllistresponse.jobid, + getUpdatedItem: function(json) { + return json.queryasyncjobresultresponse.jobresult.networkacllist; + } + } }); } }); + }, + notification: { + poll: pollAsyncJobResult } } }, @@ -1255,7 +1262,10 @@ var jid = json.deletenetworkacllistresponse.jobid; args.response.success({ _custom: { - jobId: jid + jobId: jid, + getUpdatedItem: function() { + $(window).trigger('cloudStack.fullRefresh'); + } } }); }, @@ -1292,9 +1302,8 @@ data: items, actionFilter: function(args) { var allowedActions = []; - if (isAdmin() && items.vpcid) { + if (items.vpcid != null) { allowedActions.push("remove"); - } return allowedActions; }