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/branch-alerts-dev Commit: c79fad2501a024379d409cb911e6ea72c8574ee5 Parents: 61695fa Author: aBabiichuk <ababiic...@cybervisiontech.com> Authored: Wed Aug 27 16:03:39 2014 +0300 Committer: aBabiichuk <ababiic...@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'); + } } }),