Просмотр исходного кода

AMBARI-1854. Wizards available for a non-administrator user. (srimanth)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1466274 13f79535-47bb-0310-9956-ffa450edef68
Srimanth 12 лет назад
Родитель
Сommit
6b8a497007
2 измененных файлов с 3 добавлено и 1 удалено
  1. 2 0
      CHANGES.txt
  2. 1 1
      ambari-web/app/router.js

+ 2 - 0
CHANGES.txt

@@ -670,6 +670,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-1854. Wizards available for a non-administrator user. (srimanth)
+
  AMBARI-1852. Upon clicking Services > Service > Config, a call to 
  "configurations resource is made and the server throws 400. (srimanth)
 

+ 1 - 1
ambari-web/app/router.js

@@ -258,7 +258,7 @@ App.Router = Em.Router.extend({
     }
     App.clusterStatus.updateFromServer();
     var clusterStatusOnServer = App.clusterStatus.get('value');
-    if (clusterStatusOnServer && (clusterStatusOnServer.clusterState === 'CLUSTER_STARTED_5' || clusterStatusOnServer.clusterState === 'ADD_HOSTS_COMPLETED_5' || clusterStatusOnServer.clusterState === 'STACK_UPGRADE_COMPLETED' || clusterStatusOnServer.clusterState === 'REASSIGN_MASTER_COMPLETED')) {
+    if (!localStorage.getObject('ambari').app.user.admin || clusterStatusOnServer && (clusterStatusOnServer.clusterState === 'CLUSTER_STARTED_5' || clusterStatusOnServer.clusterState === 'ADD_HOSTS_COMPLETED_5' || clusterStatusOnServer.clusterState === 'STACK_UPGRADE_COMPLETED' || clusterStatusOnServer.clusterState === 'REASSIGN_MASTER_COMPLETED')) {
       return 'main.index';
     } else if (clusterStatusOnServer && clusterStatusOnServer.wizardControllerName === App.router.get('addHostController.name')) {
       // if wizardControllerName == "addHostController", then it means someone closed the browser or the browser was crashed when we were last in Add Hosts wizard