ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ababiic...@apache.org
Subject [2/2] git commit: AMBARI-3830 Incorrect behavior of Ambari with logged on user without admin rights.. (ababiichuk)
Date Wed, 20 Nov 2013 17:32:59 GMT
AMBARI-3830 Incorrect behavior of Ambari with logged on user without admin rights.. (ababiichuk)


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

Branch: refs/heads/trunk
Commit: a61a83623c557be466892f26c617cd83e96b0f23
Parents: 89a3a2e
Author: aBabiichuk <ababiichuk@cybervisiontech.com>
Authored: Wed Nov 20 19:30:21 2013 +0200
Committer: aBabiichuk <ababiichuk@cybervisiontech.com>
Committed: Wed Nov 20 19:30:21 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/templates/common/configs/capacity_scheduler.hbs | 6 ++++--
 ambari-web/app/templates/common/configs/overriddenProperty.hbs | 6 ++++--
 ambari-web/app/templates/common/configs/service_config.hbs     | 4 ++++
 3 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a61a8362/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/capacity_scheduler.hbs b/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
index dc8c3f1..78c5ba8 100644
--- a/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
+++ b/ambari-web/app/templates/common/configs/capacity_scheduler.hbs
@@ -68,8 +68,10 @@
                                 <div {{bindAttr class="errorMessage:error: :control-group"}}>
                                   {{view viewClass serviceConfigBinding="this" categoryConfigsBinding="view.categoryConfigs"
}}
                                   {{#if view.canEdit}}
-                                      {{#if isRemovable}}
-                                          <a class="action" {{action "removeProperty"
this target="view" }} ><i class="icon-minus-sign"></i>{{t common.remove}}</a>
+                                      {{#if App.isAdmin}}
+                                        {{#if isRemovable}}
+                                            <a class="action" {{action "removeProperty"
this target="view" }} ><i class="icon-minus-sign"></i>{{t common.remove}}</a>
+                                        {{/if}}
                                       {{/if}}
                                   {{/if}}
                                     <span class="help-inline">{{errorMessage}}</span>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a61a8362/ambari-web/app/templates/common/configs/overriddenProperty.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/overriddenProperty.hbs b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
index e2b8961..579c0cd 100644
--- a/ambari-web/app/templates/common/configs/overriddenProperty.hbs
+++ b/ambari-web/app/templates/common/configs/overriddenProperty.hbs
@@ -25,9 +25,11 @@
       {{/if}}
       {{#if overriddenSCP.isEditable}}
 	      {{#if isNotDefaultValue}}
-	        <a class="action" {{action "doRestoreDefaultValue" this target="view" }} ><i
class="icon-undo"></i>Undo</a>
+	        <a class="action" {{action "doRestoreDefaultValue" this target="view" }} ><i
class="icon-undo"></i>{{t common.undo}}</a>
 	      {{/if}}
-	      <a class="action" {{action "removeOverride" overriddenSCP target="view" }} ><i
class="icon-minus-sign"></i>Remove</a>
+        {{#if App.isAdmin}}
+	        <a class="action" {{action "removeOverride" overriddenSCP target="view" }} ><i
class="icon-minus-sign"></i>{{t common.remove}}</a>
+        {{/if}}
 	      <span class="help-inline">{{overriddenSCP.errorMessage}}</span>
 	    {{/if}}
     </div>

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/a61a8362/ambari-web/app/templates/common/configs/service_config.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/common/configs/service_config.hbs b/ambari-web/app/templates/common/configs/service_config.hbs
index 5592fac..246f44d 100644
--- a/ambari-web/app/templates/common/configs/service_config.hbs
+++ b/ambari-web/app/templates/common/configs/service_config.hbs
@@ -114,7 +114,9 @@
                                 {{#if view.canEdit}}
 	                                {{#if isPropertyOverridable}}
                                     {{#if view.supportsHostOverrides}}
+                                      {{#if App.isAdmin}}
 	                                    <a class="action" {{action "createOverrideProperty"
this target="view" }} ><i class="icon-plus-sign"></i>{{t common.override}}</a>
+                                      {{/if}}
                                     {{/if}}
 	                                {{/if}}
 	                                {{#unless cantBeUndone}}
@@ -123,7 +125,9 @@
 	                                  {{/if}}
 	                                {{/unless}}
 	                                {{#if isRemovable}}
+                                    {{#if App.isAdmin}}
 	                                    <a class="action" {{action "removeProperty" this
target="view" }} ><i class="icon-minus-sign"></i>{{t common.remove}}</a>
+                                    {{/if}}
 	                                {{/if}}
                                 {{/if}}
                                   <span class="help-inline">{{errorMessage}}</span>


Mime
View raw message