You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by yu...@apache.org on 2013/08/14 00:44:36 UTC
git commit: AMBARI-2883. "Add Property" functionality is available to
non-admin users (post-install). (onechiporenko via yusaku).
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 <yu...@hortonworks.com>
Authored: Tue Aug 13 15:43:50 2013 -0700
Committer: Yusaku Sako <yu...@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>