You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by on...@apache.org on 2014/02/19 17:16:24 UTC
git commit: AMBARI-4740. Non-admin users can't go to Hosts page.
(onechiporenko)
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 <on...@apache.org>
Authored: Wed Feb 19 18:11:58 2014 +0200
Committer: Oleg Nechiporenko <on...@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'));
+ }
}
});
},