You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/05/10 13:37:41 UTC
[18/22] 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)
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/6e1367d0
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6e1367d0
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6e1367d0
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 6e1367d0b0fe44a26f772218de19e92154597e7b
Parents: 436c912
Author: Yusaku Sako <yu...@hortonworks.com>
Authored: Tue May 9 12:25:20 2017 -0700
Committer: Yusaku Sako <yu...@hortonworks.com>
Committed: Tue May 9 12:26:27 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/6e1367d0/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 ac736a6..e25ade1 100644
--- a/ambari-web/app/views/main/service/item.js
+++ b/ambari-web/app/views/main/service/item.js
@@ -239,7 +239,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');
@@ -255,7 +256,8 @@ App.MainServiceItemView = Em.View.extend({
options.push(item);
}
- });
+ });
+ }
allMasters.forEach(function(master) {
var component = App.StackServiceComponent.find(master);