Repository: ambari Updated Branches: refs/heads/trunk ecd7d092b -> 63ec0ea4b
AMBARI-14256. Logging into Ambari UI when role is less than Cluster Administrator brings user to Views page Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/63ec0ea4 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/63ec0ea4 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/63ec0ea4 Branch: refs/heads/trunk Commit: 63ec0ea4b00b4c3e5ce0671287ccfea528cb202f Parents: ecd7d09 Author: Alex Antonenko <hiv...@gmail.com> Authored: Mon Dec 7 20:24:34 2015 +0200 Committer: Alex Antonenko <hiv...@gmail.com> Committed: Mon Dec 7 20:50:53 2015 +0200 ---------------------------------------------------------------------- ambari-web/app/routes/main.js | 2 +- .../test/controllers/global/user_settings_controller_test.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/63ec0ea4/ambari-web/app/routes/main.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index dbdd6df..46315ae 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -49,7 +49,7 @@ module.exports = Em.Route.extend(App.RouterRedirections, { var currentClusterStatus = App.clusterStatus.get('value'); if (router.get('currentState.parentState.name') !== 'views' && currentClusterStatus && self.get('installerStatuses').contains(currentClusterStatus.clusterState)) { - if (App.isAccessible('ADMIN')) { + if (App.isAuthorized('AMBARI.ADD_DELETE_CLUSTERS')) { self.redirectToInstaller(router, currentClusterStatus, false); } else { Em.run.next(function () { http://git-wip-us.apache.org/repos/asf/ambari/blob/63ec0ea4/ambari-web/test/controllers/global/user_settings_controller_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/controllers/global/user_settings_controller_test.js b/ambari-web/test/controllers/global/user_settings_controller_test.js index 92bb346..13a73df 100644 --- a/ambari-web/test/controllers/global/user_settings_controller_test.js +++ b/ambari-web/test/controllers/global/user_settings_controller_test.js @@ -38,7 +38,7 @@ describe('App.UserSettingsController', function () { sinon.stub(App.ModalPopup, 'show', function(dataToShow){ dataToShowRes = dataToShow; }); - sinon.stub(App, 'isAccessible').returns(true); + sinon.stub(App, 'isAuthorized').returns(true); var emulatorClass = function() {}; emulatorClass.prototype.done = function(func) { if (func) { @@ -49,7 +49,7 @@ describe('App.UserSettingsController', function () { sinon.stub(userSettingsController, 'dataLoading').returns(emulator); }); afterEach(function () { - App.isAccessible.restore(); + App.isAuthorized.restore(); App.ModalPopup.show.restore(); userSettingsController.dataLoading.restore(); });