You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ke...@apache.org on 2012/05/28 00:35:41 UTC
[5/50] [abbrv] git commit: CS-15096: Disable network actions for
non-admins
CS-15096: Disable network actions for non-admins
reviewed-by: jessica
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/2ef18bc9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/2ef18bc9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/2ef18bc9
Branch: refs/heads/3.0.x
Commit: 2ef18bc956fffe1ec7ed05f2cf31ef27a6a09fd0
Parents: b3f5728
Author: Brian Federle <br...@citrix.com>
Authored: Fri May 25 12:55:34 2012 -0700
Committer: Brian Federle <br...@citrix.com>
Committed: Fri May 25 12:56:00 2012 -0700
----------------------------------------------------------------------
ui/scripts/sharedFunctions.js | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/2ef18bc9/ui/scripts/sharedFunctions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/sharedFunctions.js b/ui/scripts/sharedFunctions.js
index f65ab26..c0c6f21 100644
--- a/ui/scripts/sharedFunctions.js
+++ b/ui/scripts/sharedFunctions.js
@@ -253,6 +253,10 @@ cloudStack.actionFilter = {
var jsonObj = args.context.item;
var allowedActions = [];
+ if (!isAdmin()) {
+ return [];
+ }
+
if(jsonObj.type == 'Isolated') {
allowedActions.push('edit'); //only Isolated network can be upgraded
}