Repository: ambari Updated Branches: refs/heads/trunk dac8a9d75 -> e302ffed4
AMBARI-7036 restrict /#/experimental to only AMBARI.ADMIN.3 (ababiichuk) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/e302ffed Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/e302ffed Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/e302ffed Branch: refs/heads/trunk Commit: e302ffed4d50daba46af748076fb12b0a044a7c0 Parents: dac8a9d Author: aBabiichuk <[email protected]> Authored: Tue Nov 4 20:37:01 2014 +0200 Committer: aBabiichuk <[email protected]> Committed: Tue Nov 4 20:37:01 2014 +0200 ---------------------------------------------------------------------- ambari-web/app/router.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/e302ffed/ambari-web/app/router.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js index 9c27ba9..7509908 100644 --- a/ambari-web/app/router.js +++ b/ambari-web/app/router.js @@ -469,14 +469,22 @@ App.Router = Em.Router.extend({ experimental: Em.Route.extend({ route: '/experimental', enter: function (router, context) { - if (!App.get('isAdmin') || App.get('isOperator')) { + if (App.get('isOperator')) { Em.run.next(function () { - router.transitionTo("main.dashboard.widgets"); + if (router.get('clusterInstallCompleted')) { + router.transitionTo("main.dashboard.widgets"); + } else { + router.route("installer"); + } + }); + } else if (!App.get('isAdmin')) { + Em.run.next(function () { + router.transitionTo("main.views.index"); }); } }, connectOutlets: function (router, context) { - if (App.get('isAdmin')) { + if (App.get('isAdmin') && !App.get('isOperator')) { $('title').text("Ambari Experimental"); console.log('/experimental:connectOutlet'); router.get('applicationController').connectOutlet('experimental');
