Repository: ambari Updated Branches: refs/heads/branch-2.5 8c79bd168 -> 0a62d19a7
AMBARI-19286. Handle permissions for setting service auto start in FE (alexantonenko) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/0a62d19a Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/0a62d19a Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/0a62d19a Branch: refs/heads/branch-2.5 Commit: 0a62d19a7aad69ae97ea918223252d6b40d3bef7 Parents: 8c79bd1 Author: Alex Antonenko <[email protected]> Authored: Thu Dec 22 19:15:33 2016 +0200 Committer: Alex Antonenko <[email protected]> Committed: Fri Dec 23 15:23:08 2016 +0200 ---------------------------------------------------------------------- ambari-web/app/templates/main/admin/service_auto_start.hbs | 2 +- ambari-web/app/views/main/admin/service_auto_start.js | 2 +- .../views/main/admin/service_auto_start/component_auto_start.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/0a62d19a/ambari-web/app/templates/main/admin/service_auto_start.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/admin/service_auto_start.hbs b/ambari-web/app/templates/main/admin/service_auto_start.hbs index a14add2..87fc915 100644 --- a/ambari-web/app/templates/main/admin/service_auto_start.hbs +++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs @@ -63,7 +63,7 @@ </div> </div> {{/each}} - {{#isAuthorized "SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS"}} + {{#isAuthorized "SERVICE.MANAGE_AUTO_START"}} <div class="offset4"> <a href="#" class="enable-all-link" {{action enableAll tab target="controller"}}>{{t common.enableAll}}</a> | <a href="#" {{action disableAll tab target="controller"}}>{{t common.disableAll}}</a> http://git-wip-us.apache.org/repos/asf/ambari/blob/0a62d19a/ambari-web/app/views/main/admin/service_auto_start.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/service_auto_start.js b/ambari-web/app/views/main/admin/service_auto_start.js index 51512a2..be928ed 100644 --- a/ambari-web/app/views/main/admin/service_auto_start.js +++ b/ambari-web/app/views/main/admin/service_auto_start.js @@ -34,7 +34,7 @@ App.MainAdminServiceAutoStartView = Em.View.extend({ didInsertElement: function () { var self = this; - this.set('isDisabled', !App.isAuthorized('SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS')); + this.set('isDisabled', !App.isAuthorized('CLUSTER.MANAGE_AUTO_START')); this.get('controller').loadClusterConfig().done(function (data) { var tag = [ { http://git-wip-us.apache.org/repos/asf/ambari/blob/0a62d19a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js index 9794d6f..6874f49 100644 --- a/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js +++ b/ambari-web/app/views/main/admin/service_auto_start/component_auto_start.js @@ -56,7 +56,7 @@ App.MainAdminServiceAutoStartComponentView = Em.View.extend({ offText: Em.I18n.t('common.disabled'), offColor: 'default', onColor: 'success', - disabled: this.get('parentView.isDisabled'), + disabled: !App.isAuthorized('SERVICE.MANAGE_AUTO_START'), handleWidth: Math.max(Em.I18n.t('common.enabled').length, Em.I18n.t('common.disabled').length) * 8, onSwitchChange: function (event, state) { self.set('tab.enabledComponents', self.get('tab.enabledComponents') + (state ? 1 : -1));
