Updated Branches: refs/heads/master ef0be741c -> 539760ec6
CS-16612: cloudstack UI - Shared VLAN UI change - Network page - if it's Shared network and login is not root-admin, hide delete and restart option. Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/539760ec Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/539760ec Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/539760ec Branch: refs/heads/master Commit: 539760ec685973c3da6bf1d7f0029900fcc02b0d Parents: ef0be74 Author: Jessica Wang <[email protected]> Authored: Fri Oct 26 10:42:19 2012 -0700 Committer: Jessica Wang <[email protected]> Committed: Fri Oct 26 11:00:41 2012 -0700 ---------------------------------------------------------------------- ui/scripts/sharedFunctions.js | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/539760ec/ui/scripts/sharedFunctions.js ---------------------------------------------------------------------- diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js index 73e16a0..5e187ed 100644 --- a/ui/scripts/sharedFunctions.js +++ b/ui/scripts/sharedFunctions.js @@ -264,14 +264,18 @@ cloudStack.actionFilter = { guestNetwork: function(args) { var jsonObj = args.context.item; var allowedActions = []; - + if(jsonObj.type == 'Isolated') { allowedActions.push('edit'); //only Isolated network can be upgraded + allowedActions.push('restart'); + allowedActions.push('remove'); } - - allowedActions.push('restart'); - allowedActions.push('remove'); - + else if(jsonObj.type == 'Shared') { + if(isAdmin()) { + allowedActions.push('restart'); + allowedActions.push('remove'); + } + } return allowedActions; } }
