Author: srimanth
Date: Tue Apr 9 22:39:26 2013
New Revision: 1466274
URL: http://svn.apache.org/r1466274
Log:
AMBARI-1854. Wizards available for a non-administrator user. (srimanth)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-web/app/router.js
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1466274&r1=1466273&r2=1466274&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Apr 9 22:39:26 2013
@@ -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)
Modified: incubator/ambari/trunk/ambari-web/app/router.js
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-web/app/router.js?rev=1466274&r1=1466273&r2=1466274&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-web/app/router.js (original)
+++ incubator/ambari/trunk/ambari-web/app/router.js Tue Apr 9 22:39:26 2013
@@ -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