ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject git commit: AMBARI-7036 restrict /#/experimental to only AMBARI.ADMIN (ababiichuk)
Date Wed, 27 Aug 2014 13:04:53 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 61695fa43 -> c79fad250


AMBARI-7036 restrict /#/experimental to only AMBARI.ADMIN (ababiichuk)


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

Branch: refs/heads/trunk
Commit: c79fad2501a024379d409cb911e6ea72c8574ee5
Parents: 61695fa
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Wed Aug 27 16:03:39 2014 +0300
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Wed Aug 27 16:03:39 2014 +0300

----------------------------------------------------------------------
 ambari-web/app/router.js | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/c79fad25/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index 04c6385..9e16359 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -441,12 +441,16 @@ App.Router = Em.Router.extend({
     experimental: Em.Route.extend({
       route: '/experimental',
       enter: function (router, context) {
-        
+        if (!App.get('isAdmin')) {
+          router.transitionTo("main");
+        }
       },
       connectOutlets: function (router, context) {
-        $('title').text("Ambari Experimental");
-        console.log('/experimental:connectOutlet');
-        router.get('applicationController').connectOutlet('experimental');
+        if (App.get('isAdmin')) {
+          $('title').text("Ambari Experimental");
+          console.log('/experimental:connectOutlet');
+          router.get('applicationController').connectOutlet('experimental');
+        }
       }
     }),
 


Mime
View raw message