You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ts...@apache.org on 2012/10/27 12:02:26 UTC
[7/49] git commit: 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.
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/marvin-parallel
Commit: 539760ec685973c3da6bf1d7f0029900fcc02b0d
Parents: ef0be74
Author: Jessica Wang <je...@citrix.com>
Authored: Fri Oct 26 10:42:19 2012 -0700
Committer: Jessica Wang <je...@citrix.com>
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;
}
}