incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject [1/2] git commit: AMBARI-3857. Clicking on Settings link navigates to login page for a non-admin user. (onechiporenko)
Date Fri, 22 Nov 2013 14:15:10 GMT
Updated Branches:
  refs/heads/trunk a4dee94c5 -> c33215607


AMBARI-3857. Clicking on Settings link navigates to login page for a non-admin user. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 4fe3a7172f26b3677920aed8b6eb940f1b19d404
Parents: a4dee94
Author: Oleg Nechiporenko <cv_github@yahoo.com>
Authored: Fri Nov 22 16:08:00 2013 +0200
Committer: Oleg Nechiporenko <cv_github@yahoo.com>
Committed: Fri Nov 22 16:15:05 2013 +0200

----------------------------------------------------------------------
 ambari-web/app/controllers/application.js | 3 +++
 ambari-web/app/templates/application.hbs  | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fe3a717/ambari-web/app/controllers/application.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/controllers/application.js b/ambari-web/app/controllers/application.js
index ab079b4..ef72985 100644
--- a/ambari-web/app/controllers/application.js
+++ b/ambari-web/app/controllers/application.js
@@ -107,6 +107,9 @@ App.ApplicationController = Em.Controller.extend({
   },
 
   showSettingsPopup: function() {
+    // Settings only for admins
+    if (!App.get('isAdmin')) return;
+
     var self = this;
     var curValue = null;
     this.dataLoading().done(function (initValue) {

http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/4fe3a717/ambari-web/app/templates/application.hbs
----------------------------------------------------------------------
diff --git a/ambari-web/app/templates/application.hbs b/ambari-web/app/templates/application.hbs
index ee3c46d..2eb986b 100644
--- a/ambari-web/app/templates/application.hbs
+++ b/ambari-web/app/templates/application.hbs
@@ -44,7 +44,9 @@
                 {{App.router.loginName}}&nbsp;<span class="caret"></span>
               </button>
               <ul class="dropdown-menu">
-                <li><a href="" {{action showSettingsPopup target="controller"}}>{{t
app.settings}}</a></li>
+                {{#if App.isAdmin}}
+                  <li><a href="" {{action showSettingsPopup target="controller"}}>{{t
app.settings}}</a></li>
+                {{/if}}
                 <li><a href="" {{action logoff}}>{{t app.signout}}</a></li>
               </ul>
             </div>


Mime
View raw message