You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ja...@apache.org on 2017/04/11 18:29:02 UTC
[14/50] [abbrv] ambari git commit: AMBARI-20651 - When in Upgrade
paused state, links should be disabled for less privileged user (rzang)
AMBARI-20651 - When in Upgrade paused state, links should be disabled for less privileged user (rzang)
Change-Id: I4f6460680f420a5664923136756aaa1e9cb9af09
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/b491509a
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/b491509a
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/b491509a
Branch: refs/heads/ambari-rest-api-explorer
Commit: b491509ab65353494d8660e2954c87c3a6f1abf4
Parents: 8c2ff91
Author: Richard Zang <rz...@apache.org>
Authored: Tue Apr 4 15:19:12 2017 -0700
Committer: Richard Zang <rz...@apache.org>
Committed: Tue Apr 4 15:19:12 2017 -0700
----------------------------------------------------------------------
ambari-web/app/controllers/application.js | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/b491509a/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index 580f337..d813d89 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -83,24 +83,24 @@ App.ApplicationController = Em.Controller.extend(App.Persist, {
var upgradeSuspended = App.get('upgradeSuspended');
var isDowngrade = App.router.get('mainAdminStackAndUpgradeController.isDowngrade');
var typeSuffix = isDowngrade ? 'downgrade' : 'upgrade';
-
+ var hasUpgradePrivilege = App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK');
if (upgradeInProgress) {
return {
- cls: 'upgrade-in-progress',
+ cls: hasUpgradePrivilege? 'upgrade-in-progress' : 'upgrade-in-progress not-allowed-cursor',
icon: 'glyphicon-cog',
msg: Em.I18n.t('admin.stackVersions.version.' + typeSuffix + '.running')
}
}
if (upgradeHolding) {
return {
- cls: 'upgrade-holding',
+ cls: hasUpgradePrivilege? 'upgrade-holding' : 'upgrade-holding not-allowed-cursor',
icon: 'glyphicon-pause',
msg: Em.I18n.t('admin.stackVersions.version.' + typeSuffix + '.pause')
}
}
if (upgradeSuspended) {
return {
- cls: 'upgrade-aborted',
+ cls: hasUpgradePrivilege? 'upgrade-aborted' : 'upgrade-aborted not-allowed-cursor',
icon: 'glyphicon-pause',
msg: Em.I18n.t('admin.stackVersions.version.' + typeSuffix + '.suspended')
}