Browse Source

AMBARI-3432: New non-admin user can't log in.(jaimin)

Jaimin Jetly 12 years ago
parent
commit
0328b7c05e
1 changed files with 5 additions and 3 deletions
  1. 5 3
      ambari-web/app/views/main/dashboard.js

+ 5 - 3
ambari-web/app/views/main/dashboard.js

@@ -124,7 +124,7 @@ App.MainDashboardView = Em.View.extend({
     obj.set('visible', visibleFull);
     obj.set('hidden', hiddenFull);
   },
-  
+
   hdfs_model: null,
   mapreduce_model: null,
   mapreduce2_model: null,
@@ -238,7 +238,9 @@ App.MainDashboardView = Em.View.extend({
         this.translateToReal(this.get('currentPrefObject'));
       } else {
         // post persist then translate init object
-        this.postUserPref(this.get('persistKey'), this.get('initPrefObject'));
+        if(App.get('isAdmin')) {
+          this.postUserPref(this.get('persistKey'), this.get('initPrefObject'));
+        }
         this.translateToReal(this.get('initPrefObject'));
       }
     }
@@ -585,4 +587,4 @@ App.MainDashboardView = Em.View.extend({
     });
     event.stopPropagation();
   }
-});
+});