Repository: ambari
Updated Branches:
  refs/heads/trunk bd1b74440 -> 33239523d


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/33239523
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/33239523
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/33239523

Branch: refs/heads/trunk
Commit: 33239523dcc0e226171fa7a699194e9bdb33ab4b
Parents: bd1b744
Author: Richard Zang <[email protected]>
Authored: Thu Jan 5 14:57:54 2017 -0800
Committer: Richard Zang <[email protected]>
Committed: Thu Jan 5 14:58:19 2017 -0800

----------------------------------------------------------------------
 ambari-web/app/routes/main.js | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/33239523/ambari-web/app/routes/main.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/routes/main.js b/ambari-web/app/routes/main.js
index e837110..382818b 100644
--- a/ambari-web/app/routes/main.js
+++ b/ambari-web/app/routes/main.js
@@ -558,6 +558,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');

Reply via email to