Updated Branches:
  refs/heads/master 6e5577679 -> ab2e3b9e0

CLOUDSTACK-2678: portable IP ranges - regions menu - region detailView - show 
"View Portable IP Ranges" for root-admin, hide it for regular-user/domain-admin.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/ab2e3b9e
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/ab2e3b9e
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/ab2e3b9e

Branch: refs/heads/master
Commit: ab2e3b9e07c0da623011859ef73388b5ce0c11ce
Parents: 6e55776
Author: Jessica Wang <jessicaw...@apache.org>
Authored: Tue May 28 16:16:34 2013 -0700
Committer: Jessica Wang <jessicaw...@apache.org>
Committed: Tue May 28 16:16:34 2013 -0700

----------------------------------------------------------------------
 ui/scripts/regions.js |   16 ++++++++++++++--
 1 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/ab2e3b9e/ui/scripts/regions.js
----------------------------------------------------------------------
diff --git a/ui/scripts/regions.js b/ui/scripts/regions.js
index b9b6dae..4be600f 100644
--- a/ui/scripts/regions.js
+++ b/ui/scripts/regions.js
@@ -117,8 +117,20 @@
           detailView: {
             name: 'Region details',
             viewAll: [
-              { path: 'regions.GSLB', label: 'GSLB' },
-              { path: 'regions.portableIpRanges', label: 'Portable IP' }
+              { 
+                path: 'regions.GSLB', 
+                label: 'GSLB' 
+              },
+              { 
+                path: 'regions.portableIpRanges', 
+                label: 'Portable IP',
+                preFilter: function(args) {                  
+                  if (isAdmin())
+                    return true;
+
+                  return false;
+                }
+              }
             ],
             actions: {
               edit: {

Reply via email to