Browse Source

AMBARI-2063. Admin features not available for user with admin rights under certain conditions. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1478199 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 năm trước cách đây
mục cha
commit
b5e17cee65
2 tập tin đã thay đổi với 5 bổ sung3 xóa
  1. 3 0
      CHANGES.txt
  2. 2 3
      ambari-web/app/models/user.js

+ 3 - 0
CHANGES.txt

@@ -825,6 +825,9 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2063. Admin features not available for user with admin rights under
+ certain conditions. (yusaku)
+
  AMBARI-2060. Initiate a recommission, on success, the operations dialog says
  decommission, not recommission. (yusaku)
 

+ 2 - 3
ambari-web/app/models/user.js

@@ -155,17 +155,16 @@ App.CreateUserForm = App.Form.extend({
     var object = this.get('object');
     var formValues = {};
     $.each(this.get('fields'), function () {
-      formValues[this.get('name')] = this.get('value');
+      formValues[Ember.String.decamelize(this.get('name'))] = this.get('value');
     });
 
     if (this.get('className')) {
-      App.store.createRecord(this.get('className'), formValues);
+      App.store.load(this.get('className'), formValues.user_name, formValues);
     }
     else {
       console.log("Please define class name for your form " + this.constructor);
     }
 
-    //App.store.commit();
     this.set('result', 1);
 
     return true;