Browse Source

AMBARI-14324. Users with non-administrator permissions should not be presented with an option to edit stack repository URLs

Alex Antonenko 9 years ago
parent
commit
9df68b9780

+ 1 - 1
ambari-web/app/templates/main/admin/stack_upgrade/versions.hbs

@@ -36,7 +36,7 @@
       {{/each}}
     </ul>
   </div>
-  {{#isAuthorized "CLUSTER.UPGRADE_DOWNGRADE_STACK"}}
+  {{#isAuthorized "AMBARI.MANAGE_STACK_VERSIONS"}}
     <button class="btn btn-primary pull-right" {{action goToVersions target="view"}} id="manage-versions-link">
       <i class="icon-external-link"></i>&nbsp;{{t admin.stackVersions.manageVersions}}
     </button>

+ 1 - 1
ambari-web/app/views/main/admin/stack_upgrade/upgrade_version_box_view.js

@@ -55,7 +55,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');
+    return ['INSTALLING', 'UPGRADING'].contains(this.get('content.status')) || this.get('isUpgrading') || (!App.isAuthorized('AMBARI.MANAGE_STACK_VERSIONS') && this.get('content.status') === 'CURRENT');
   }.property('content.status', 'isUpgrading'),
 
   /**