ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From onechipore...@apache.org
Subject git commit: AMBARI-4740. Non-admin users can't go to Hosts page. (onechiporenko)
Date Wed, 19 Feb 2014 16:16:24 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 8c27b827e -> 9dca63fd5


AMBARI-4740. Non-admin users can't go to Hosts page. (onechiporenko)


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

Branch: refs/heads/trunk
Commit: 9dca63fd5707efe510fba2007745bd36c918e6bb
Parents: 8c27b82
Author: Oleg Nechiporenko <onechiporenko@apache.org>
Authored: Wed Feb 19 18:11:58 2014 +0200
Committer: Oleg Nechiporenko <onechiporenko@apache.org>
Committed: Wed Feb 19 18:16:18 2014 +0200

----------------------------------------------------------------------
 ambari-web/app/views/common/table_view.js | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/9dca63fd/ambari-web/app/views/common/table_view.js
----------------------------------------------------------------------
diff --git a/ambari-web/app/views/common/table_view.js b/ambari-web/app/views/common/table_view.js
index fe8adcc..19aa3cd 100644
--- a/ambari-web/app/views/common/table_view.js
+++ b/ambari-web/app/views/common/table_view.js
@@ -146,7 +146,9 @@ App.TableView = Em.View.extend({
     console.log('Persist did NOT find the key');
     var displayLengthDefault = "10";
     this.set('displayLengthOnLoad', displayLengthDefault);
-    this.postUserPref(this.displayLengthKey(), displayLengthDefault);
+    if (App.get('isAdmin')) {
+      this.postUserPref(this.displayLengthKey(), displayLengthDefault);
+    }
     return displayLengthDefault;
   },
 
@@ -310,7 +312,9 @@ App.TableView = Em.View.extend({
     Em.run.next(function() {
       App.db.setDisplayLength(self.get('controller.name'), self.get('displayLength'));
       if (!App.testMode) {
-        self.postUserPref(self.displayLengthKey(), self.get('displayLength'));
+        if (App.get('isAdmin')) {
+          self.postUserPref(self.displayLengthKey(), self.get('displayLength'));
+        }
       }
     });
   },


Mime
View raw message