Browse Source

AMBARI-2075. Admin role can't be assigned to LDAP user. (yusaku)

git-svn-id: https://svn.apache.org/repos/asf/incubator/ambari/trunk@1479657 13f79535-47bb-0310-9956-ffa450edef68
Yusaku Sako 12 năm trước cách đây
mục cha
commit
65f429487d

+ 2 - 0
CHANGES.txt

@@ -828,6 +828,8 @@ Trunk (unreleased changes):
 
  BUG FIXES
 
+ AMBARI-2075. Admin role can't be assigned to LDAP user. (yusaku)
+
  AMBARI-2080. Cluster name and Background operations indicator should
  disappear on logout. (jaimin)
 

+ 2 - 1
ambari-web/app/config.js

@@ -51,7 +51,8 @@ App.supports = {
   multipleHBaseMasters: false,
   addMasters: false,
   customizeSmokeTestUser: false,
-  hue: false
+  hue: false,
+  ldapGroupMapping: false
 };
 
 if (App.enableExperimental) {

+ 1 - 1
ambari-web/app/messages.js

@@ -571,7 +571,7 @@ Em.I18n.translations = {
   'admin.addSecurity.apply.stage5': '5. Smoke Test',
   'admin.removeSecurity.header': 'Disable Security',
   'admin.security.status.error' : 'Error in retrieving cluster security status from Ambari server',
-  'admin.users.ldapAuthentionUsed':'LDAP Authentication is being used to authenticate users',
+  'admin.users.ldapAuthUsed':'LDAP Authentication is being used to authenticate users',
   'admin.users.delete.yourself.message':'You can\'t delete yourself',
   'admin.users.delete.yourself.header':'Deleting warning',
 

+ 1 - 1
ambari-web/app/models/user.js

@@ -62,7 +62,7 @@ App.EditUserForm = App.Form.extend({
   disableAdminCheckbox:function () {
     var object = this.get('object');
     if (object) {
-      if((object.get('userName') == App.get('router').getLoginName()) || object.get("isLdap")){
+      if ((object.get('userName') == App.get('router').getLoginName()) || App.supports.ldapGroupMapping && object.get("isLdap")) {
         this.getField("admin").set("disabled", true);
       } else {
         this.getField("admin").set("disabled", false);

+ 1 - 1
ambari-web/app/templates/main/admin/user.hbs

@@ -17,7 +17,7 @@
 }}
 
 {{#if view.ldapUser}}
-<p class="text-info">{{t admin.users.ldapAuthentionUsed}}.</p>
+<p class="text-info">{{t admin.users.ldapAuthUsed}}.</p>
 {{else}}
 <table class="table table-bordered table-striped span6">
   <thead>

+ 1 - 1
ambari-web/app/views/main/admin/user/edit.js

@@ -67,7 +67,7 @@ App.MainAdminUserEditView = Em.View.extend({
 
   didInsertElement: function() {
     var form = this.get('userForm');
-    if(form.getField("isLdap").get("value")) {
+    if (form.getField("isLdap").get("value")) {
       form.getField("old_password").set("disabled",true);
       form.getField("new_password").set("disabled",true);
     }