You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2016/03/15 11:34:59 UTC
ambari git commit: AMBARI-15423. Config tab is missing for user A if
user B is running some wizard (onechiporenko)
Repository: ambari
Updated Branches:
refs/heads/trunk 69a25e324 -> 3c37c38e6
AMBARI-15423. Config tab is missing for user A if user B is running some wizard (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3c37c38e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3c37c38e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3c37c38e
Branch: refs/heads/trunk
Commit: 3c37c38e60d5e65afacec60d0ab3019a43bbe00c
Parents: 69a25e3
Author: Oleg Nechiporenko <on...@apache.org>
Authored: Tue Mar 15 12:32:24 2016 +0200
Committer: Oleg Nechiporenko <on...@apache.org>
Committed: Tue Mar 15 12:32:24 2016 +0200
----------------------------------------------------------------------
ambari-web/app/app.js | 11 ++++++++++-
ambari-web/app/views/main/service/item.js | 2 +-
2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/3c37c38e/ambari-web/app/app.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/app.js b/ambari-web/app/app.js
index ab189f8..319cc42 100644
--- a/ambari-web/app/app.js
+++ b/ambari-web/app/app.js
@@ -99,7 +99,16 @@ module.exports = Em.Application.create({
App.router.get('wizardWatcherController.isNonWizardUser');
}.property('upgradeIsRunning', 'upgradeAborted', 'router.wizardWatcherController.isNonWizardUser'),
+ /**
+ * Options:
+ * - ignoreWizard: ignore when some wizard is running by another user (default `false`)
+ *
+ * @param {string} authRoles
+ * @param {object} options
+ * @returns {boolean}
+ */
isAuthorized: function(authRoles, options) {
+ options = $.extend({ignoreWizard: false}, options);
var result = false;
authRoles = $.map(authRoles.split(","), $.trim);
@@ -110,7 +119,7 @@ module.exports = Em.Application.create({
return false;
}
- if (App.router.get('wizardWatcherController.isNonWizardUser')) {
+ if (!options.ignoreWizard && App.router.get('wizardWatcherController.isNonWizardUser')) {
return false;
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/3c37c38e/ambari-web/app/views/main/service/item.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/service/item.js b/ambari-web/app/views/main/service/item.js
index 7cb8c40..2b9f3fd 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -294,7 +294,7 @@ App.MainServiceItemView = Em.View.extend({
}.property('maintenance'),
hasConfigTab: function() {
- return App.isAuthorized('CLUSTER.VIEW_CONFIGS') && !App.get('services.noConfigTypes').contains(this.get('controller.content.serviceName'));
+ return App.isAuthorized('CLUSTER.VIEW_CONFIGS', {ignoreWizard: true}) && !App.get('services.noConfigTypes').contains(this.get('controller.content.serviceName'));
}.property('controller.content.serviceName','App.services.noConfigTypes'),
hasHeatmapTab: function() {