[UI] bug fix: Delete added ACL lists is not available for Domain Admin and normal users

This commit is contained in:
Wei Zhou 2015-12-10 14:09:45 +01:00
parent 3515f574c3
commit 709e0c555e
1 changed files with 15 additions and 6 deletions

View File

@ -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;
}