ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rle...@apache.org
Subject [04/50] [abbrv] ambari git commit: AMBARI-21120: Roles below Cluster Administrator should not be allowed to edit repositories and install stack versions (sangeetar)
Date Thu, 08 Jun 2017 19:22:18 GMT
AMBARI-21120: Roles below Cluster Administrator should not be allowed to edit repositories
and install stack versions (sangeetar)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/7a0eda7e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/7a0eda7e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/7a0eda7e

Branch: refs/heads/branch-feature-AMBARI-20859
Commit: 7a0eda7ec99882fd40bdd6b036e2301f6e0486da
Parents: 851c857
Author: Sangeeta Ravindran <sangeetar@apache.org>
Authored: Thu Jun 1 10:47:29 2017 -0700
Committer: Sangeeta Ravindran <sangeetar@apache.org>
Committed: Thu Jun 1 10:47:29 2017 -0700

----------------------------------------------------------------------
 .../views/main/admin/stack_upgrade/upgrade_version_box_view.js   | 4 ++--
 .../main/admin/stack_upgrade/upgrade_version_box_view_test.js    | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/7a0eda7e/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
index f102402..bb0cc81 100644
--- a/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
+++ b/ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js
@@ -61,7 +61,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
   }.property('App.upgradeState', 'content.displayName', 'controller.upgradeVersion'),
 
   isRepoUrlsEditDisabled: function () {
-    return ['INSTALLING', 'UPGRADING'].contains(this.get('content.status')) || this.get('isUpgrading')
|| (!App.isAuthorized('AMBARI.MANAGE_STACK_VERSIONS') && this.get('content.status')
=== 'CURRENT');
+    return ['INSTALLING', 'UPGRADING'].contains(this.get('content.status')) || this.get('isUpgrading')
|| (!App.isAuthorized('AMBARI.MANAGE_STACK_VERSIONS'));
   }.property('content.status', 'isUpgrading'),
 
   /**
@@ -231,7 +231,7 @@ App.UpgradeVersionBoxView = Em.View.extend({
       element.set('isDisabled', this.get('controller.requestInProgress'));
     }
     //For restricted upgrade wizard should be disabled in any state
-    if (this.get('controller.isWizardRestricted')) {
+    if (this.get('controller.isWizardRestricted') || (!App.isAuthorized('CLUSTER.UPGRADE_DOWNGRADE_STACK')))
{
       element.set('isDisabled', true);
     }
     return element;

http://git-wip-us.apache.org/repos/asf/ambari/blob/7a0eda7e/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
----------------------------------------------------------------------
diff --git a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
index 153b66f..31aa796 100644
--- a/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
+++ b/ambari-web/test/views/main/admin/stack_upgrade/upgrade_version_box_view_test.js
@@ -465,7 +465,7 @@ describe('App.UpgradeVersionBoxView', function () {
           status: 'INIT',
           isButton: true,
           buttons: [],
-          isDisabled: false
+          isDisabled: true
         },
         title: 'INIT state, no admin access, no requests in progress'
       },
@@ -962,7 +962,7 @@ describe('App.UpgradeVersionBoxView', function () {
           isButton: true,
           action: 'resumeUpgrade',
           text: Em.I18n.t('admin.stackUpgrade.dialog.resume'),
-          isDisabled: false
+          isDisabled: true
         },
         title: 'upgrade suspended'
       },


Mime
View raw message