Repository: ambari
Updated Branches:
  refs/heads/trunk fc5870779 -> e2d564cda


AMBARI-17217 Unexpected URI for "experimental" page. (atkach)


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

Branch: refs/heads/trunk
Commit: e2d564cda15e1985fe50f58ea9ef5219c187edb6
Parents: fc58707
Author: Andrii Tkach <[email protected]>
Authored: Tue Jun 14 14:30:40 2016 +0300
Committer: Andrii Tkach <[email protected]>
Committed: Tue Jun 14 16:46:35 2016 +0300

----------------------------------------------------------------------
 ambari-web/app/router.js | 28 +++++++++++++++-------------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/e2d564cd/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index d3caf6a..a057215 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -950,22 +950,24 @@ App.Router = Em.Router.extend({
     experimental: Em.Route.extend({
       route: '/experimental',
       enter: function (router, context) {
-        if (App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
-          Em.run.next(function () {
-            if (router.get('clusterInstallCompleted')) {
-              router.transitionTo("main.dashboard.widgets");
-            } else {
-              router.route("installer");
-            }
-          });
-        } else if (!App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
-          Em.run.next(function () {
-            router.transitionTo("main.views.index");
-          });
+        if (!App.isAuthorized('AMBARI.MANAGE_SETTINGS')) {
+          if (App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
+            Em.run.next(function () {
+              if (router.get('clusterInstallCompleted')) {
+                router.transitionTo("main.dashboard.widgets");
+              } else {
+                router.transitionTo("main.views.index");
+              }
+            });
+          } else {
+            Em.run.next(function () {
+              router.transitionTo("main.views.index");
+            });
+          }
         }
       },
       connectOutlets: function (router, context) {
-        if (App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')) {
+        if (App.isAuthorized('AMBARI.MANAGE_SETTINGS')) {
           
App.router.get('experimentalController').loadSupports().complete(function () {
             $('title').text(Em.I18n.t('app.name.subtitle.experimental'));
             router.get('applicationController').connectOutlet('experimental');

Reply via email to