You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2013/11/20 18:32:59 UTC

[2/2] git commit: AMBARI-3830 Incorrect behavior of Ambari with logged on user without admin rights.. (ababiichuk)

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 <ab...@cybervisiontech.com>
Authored: Wed Nov 20 19:30:21 2013 +0200
Committer: aBabiichuk <ab...@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>