ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [36/50] ambari git commit: AMBARI-20651 - When in Upgrade paused state, links should be disabled for less privileged user (rzang)
Date Thu, 06 Apr 2017 18:58:25 GMT
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/branch-feature-AMBARI-12556
Commit: b491509ab65353494d8660e2954c87c3a6f1abf4
Parents: 8c2ff91
Author: Richard Zang <rzang@apache.org>
Authored: Tue Apr 4 15:19:12 2017 -0700
Committer: Richard Zang <rzang@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')
       }


Mime
View raw message