Repository: ambari Updated Branches: refs/heads/branch-2.5 8e070f4bd -> 8ca19525a
AMBARI-19393 - Cluster User role is able to view auto start page (rzang) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8ca19525 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8ca19525 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8ca19525 Branch: refs/heads/branch-2.5 Commit: 8ca19525a59d9ee512df12d2110f6e8f1453f87a Parents: 8e070f4 Author: Richard Zang <[email protected]> Authored: Thu Jan 5 14:57:54 2017 -0800 Committer: Richard Zang <[email protected]> Committed: Thu Jan 5 15:01:45 2017 -0800 ---------------------------------------------------------------------- ambari-web/app/routes/main.js | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/8ca19525/ambari-web/app/routes/main.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js index 7e7b622..880c071 100644 --- a/ambari-web/app/routes/main.js +++ b/ambari-web/app/routes/main.js @@ -557,6 +557,11 @@ module.exports = Em.Route.extend(App.RouterRedirections, { adminServiceAutoStart: Em.Route.extend({ route: '/serviceAutoStart', + enter: function(router, transition) { + if (router.get('loggedIn') && !App.isAuthorized('CLUSTER.MANAGE_AUTO_START') && !App.isAuthorized('CLUSTER.MANAGE_AUTO_START')) { + router.transitionTo('main.dashboard.index'); + } + }, connectOutlets: function (router) { router.set('mainAdminController.category', "serviceAutoStart"); router.get('mainAdminController').connectOutlet('mainAdminServiceAutoStart');
