ambari git commit: AMBARI-19286. Handle permissions for setting service auto start in FE (alexantonenko)
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 Authored: Thu Dec 22 19:15:33 2016 +0200 Committer: Alex Antonenko 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 @@ {{/each}} -{{#isAuthorized "SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS"}} +{{#isAuthorized "SERVICE.MANAGE_AUTO_START"}} {{t common.enableAll}} | {{t common.disableAll}} 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));
ambari git commit: AMBARI-19286. Handle permissions for setting service auto start in FE (alexantonenko)
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 Authored: Thu Dec 22 19:18:13 2016 +0200 Committer: Alex Antonenko 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 @@ {{/each}} -{{#isAuthorized "SERVICE.START_STOP, CLUSTER.MODIFY_CONFIGS"}} +{{#isAuthorized "SERVICE.MANAGE_AUTO_START"}} 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));