ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject ambari git commit: AMBARI-20961. RBAC: Service Operator/Administrator Role don't have HOST.ADD_DELETE_COMPONENTS permission so we 'd better hide relevant buttons on Web UI. (Yao Lei via yusaku)
Date Tue, 09 May 2017 19:26:00 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 e12518654 -> ea936070a


AMBARI-20961. RBAC: Service Operator/Administrator Role don't have HOST.ADD_DELETE_COMPONENTS
permission so we 'd better hide relevant buttons on Web UI. (Yao Lei via yusaku)


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

Branch: refs/heads/branch-2.5
Commit: ea936070a5914731ed0e414533df4d2016f64d19
Parents: e125186
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Tue May 9 12:25:20 2017 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Tue May 9 12:25:20 2017 -0700

----------------------------------------------------------------------
 ambari-web/app/views/main/service/item.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/ea936070/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 b5c665f..09457f2 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -238,7 +238,8 @@ App.MainServiceItemView = Em.View.extend({
         });
       }
 
-      self.addActionMap().filterProperty('service', serviceName).forEach(function(item) {
+      if(App.isAuthorized('HOST.ADD_DELETE_COMPONENTS')){
+        self.addActionMap().filterProperty('service', serviceName).forEach(function(item)
{
         if (App.get('components.addableToHost').contains(item.component)) {
 
           var isEnabled = App.HostComponent.find().filterProperty('componentName', item.component).length
< App.get('allHostNames.length');
@@ -254,7 +255,8 @@ App.MainServiceItemView = Em.View.extend({
 
           options.push(item);
         }
-      });
+       });
+      }
 
       allMasters.forEach(function(master) {
         var component = App.StackServiceComponent.find(master);


Mime
View raw message