You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2014/08/27 15:04:53 UTC

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

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 <ab...@cybervisiontech.com>
Authored: Wed Aug 27 16:03:39 2014 +0300
Committer: aBabiichuk <ab...@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');
+        }
       }
     }),