فهرست منبع

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

Oleg Nechiporenko 11 سال پیش
والد
کامیت
9dca63fd57
1فایلهای تغییر یافته به همراه6 افزوده شده و 2 حذف شده
  1. 6 2
      ambari-web/app/views/common/table_view.js

+ 6 - 2
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'));
+        }
       }
     });
   },