Repository: ambari Updated Branches: refs/heads/trunk a98bd6b79 -> dc408b355
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/dc408b35 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/dc408b35 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/dc408b35 Branch: refs/heads/trunk Commit: dc408b3552ef503c845d62759c27dd32c4f291e7 Parents: a98bd6b Author: Alex Antonenko <[email protected]> Authored: Thu Dec 22 19:18:13 2016 +0200 Committer: Alex Antonenko <[email protected]> Committed: Fri Dec 23 15:22:23 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/dc408b35/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 c5a92cf..0de7d40 100644 --- a/ambari-web/app/templates/main/admin/service_auto_start.hbs +++ b/ambari-web/app/templates/main/admin/service_auto_start.hbs @@ -80,7 +80,7 @@ </tr> {{/each}} </tbody> - {{#isAuthorized "SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS"}} + {{#isAuthorized "SERVICE.MANAGE_AUTO_START"}} <tfoot> <tr> <td class="col-md-4"></td> http://git-wip-us.apache.org/repos/asf/ambari/blob/dc408b35/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 1af9845..317b029 100644 --- a/ambari-web/app/views/main/admin/service_auto_start.js +++ b/ambari-web/app/views/main/admin/service_auto_start.js @@ -32,7 +32,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').load().then(function() { self.set('isLoaded', true); self.initSwitcher(); http://git-wip-us.apache.org/repos/asf/ambari/blob/dc408b35/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 a1e09f2..b8ad812 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 @@ -45,7 +45,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));
