incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yus...@apache.org
Subject git commit: AMBARI-2883. "Add Property" functionality is available to non-admin users (post-install). (onechiporenko via yusaku).
Date Tue, 13 Aug 2013 22:44:36 GMT
Updated Branches:
  refs/heads/trunk 90395eee0 -> cb4f8f4eb


AMBARI-2883. "Add Property" functionality is available to non-admin users (post-install).
(onechiporenko via yusaku).


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

Branch: refs/heads/trunk
Commit: cb4f8f4ebc04b49f313ec93e63d90d5dfd627d72
Parents: 90395ee
Author: Yusaku Sako <yusaku@hortonworks.com>
Authored: Tue Aug 13 15:43:50 2013 -0700
Committer: Yusaku Sako <yusaku@hortonworks.com>
Committed: Tue Aug 13 15:43:50 2013 -0700

----------------------------------------------------------------------
 ambari-web/app/router.js                            |  1 +
 .../app/templates/common/configs/service_config.hbs | 16 +++++++++-------
 2 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/cb4f8f4e/ambari-web/app/router.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/router.js b/ambari-web/app/router.js
index cb70092..146704b 100644
--- a/ambari-web/app/router.js
+++ b/ambari-web/app/router.js
@@ -182,6 +182,7 @@ App.Router = Em.Router.extend({
     var d = data;
     var isAdmin = data.Users.roles.indexOf('admin') >= 0;
     if (isAdmin) {
+      App.set('isAdmin', true);
       var controller = this.get('loginController');
       this.setAuthenticated(true);
       this.setLoginName(params.loginName);

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/cb4f8f4e/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 6fea0b0..fc7e554 100644
--- a/ambari-web/app/templates/common/configs/service_config.hbs
+++ b/ambari-web/app/templates/common/configs/service_config.hbs
@@ -110,13 +110,15 @@
                   {{/each}}
 
                   {{! For Advanced, Advanced Core Site, Advanced HDFS Site sections, show
the 'Add Property' link.}}
-                  {{#if view.canEdit}}
-	                  {{#if category.canAddProperty }}
-	                      <div>
-	                          <a href="#" {{action "showAddPropertyWindow" this target="view"
}} >{{t installer.step7.config.addProperty}}...</a>
-	                      </div>
-	                  {{/if}}
-	                {{/if}}
+                  {{#if App.isAdmin}}
+                    {{#if view.canEdit}}
+                      {{#if category.canAddProperty }}
+                        <div>
+                          <a href="#" {{action "showAddPropertyWindow" this target="view"
}} >{{t installer.step7.config.addProperty}}...</a>
+                        </div>
+                      {{/if}}
+                    {{/if}}
+                  {{/if}}
                 </form>
               </div>
             </div>


Mime
View raw message