Return-Path: X-Original-To: apmail-ambari-commits-archive@www.apache.org Delivered-To: apmail-ambari-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4D87310156 for ; Wed, 19 Feb 2014 16:16:35 +0000 (UTC) Received: (qmail 47692 invoked by uid 500); 19 Feb 2014 16:16:28 -0000 Delivered-To: apmail-ambari-commits-archive@ambari.apache.org Received: (qmail 47567 invoked by uid 500); 19 Feb 2014 16:16:25 -0000 Mailing-List: contact commits-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@ambari.apache.org Delivered-To: mailing list commits@ambari.apache.org Received: (qmail 47543 invoked by uid 99); 19 Feb 2014 16:16:25 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 19 Feb 2014 16:16:25 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id B82A78C39D9; Wed, 19 Feb 2014 16:16:24 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: onechiporenko@apache.org To: commits@ambari.apache.org Message-Id: <109e61e54b984799919364a4971202ae@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: AMBARI-4740. Non-admin users can't go to Hosts page. (onechiporenko) Date: Wed, 19 Feb 2014 16:16:24 +0000 (UTC) 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 Authored: Wed Feb 19 18:11:58 2014 +0200 Committer: Oleg Nechiporenko 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')); + } } }); },