ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [11/50] [abbrv] git commit: AMBARI-6902. LDAP uses redundant properties from ambari configuration. (mahadev)
Date Wed, 20 Aug 2014 15:30:12 GMT
AMBARI-6902. LDAP uses redundant properties from ambari configuration. (mahadev)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/bba2806f
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/bba2806f
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/bba2806f

Branch: refs/heads/branch-alerts-dev
Commit: bba2806f76d98a139e83736fd08b72fae0ab27c1
Parents: e7d864c
Author: Mahadev Konar <mahadev@apache.org>
Authored: Mon Aug 18 13:29:51 2014 -0700
Committer: Mahadev Konar <mahadev@apache.org>
Committed: Mon Aug 18 13:29:55 2014 -0700

----------------------------------------------------------------------
 .../authorization/AmbariLdapDataPopulator.java     | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/bba2806f/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapDataPopulator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapDataPopulator.java
b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapDataPopulator.java
index 29b69a6..7932833 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapDataPopulator.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/security/authorization/AmbariLdapDataPopulator.java
@@ -91,7 +91,7 @@ public class AmbariLdapDataPopulator {
 
             public Object mapFromAttributes(Attributes attributes)
                 throws NamingException {
-              return attributes.get("uid").get();
+              return "";
             }
           });
       return true;
@@ -269,10 +269,7 @@ public class AmbariLdapDataPopulator {
     final LdapTemplate ldapTemplate = loadLdapTemplate();
     final EqualsFilter equalsFilter = new EqualsFilter("objectClass",
         ldapServerProperties.getGroupObjectClass());
-    String baseDn = ldapServerProperties.getGroupBase();
-    if (baseDn == null) {
-      baseDn = ldapServerProperties.getBaseDN();
-    }
+    String baseDn = ldapServerProperties.getBaseDN();
     ldapTemplate.search(baseDn, equalsFilter.encode(), new AttributesMapper() {
 
       public Object mapFromAttributes(Attributes attributes)
@@ -295,10 +292,7 @@ public class AmbariLdapDataPopulator {
     final LdapTemplate ldapTemplate = loadLdapTemplate();
     final EqualsFilter equalsFilter = new EqualsFilter("objectClass",
         ldapServerProperties.getUserObjectClass());
-    String baseDn = ldapServerProperties.getUserBase();
-    if (baseDn == null) {
-      baseDn = ldapServerProperties.getBaseDN();
-    }
+    String baseDn = ldapServerProperties.getBaseDN();
     ldapTemplate.search(baseDn, equalsFilter.encode(), new AttributesMapper() {
 
       public Object mapFromAttributes(Attributes attributes)
@@ -323,10 +317,7 @@ public class AmbariLdapDataPopulator {
     final AndFilter andFilter = new AndFilter();
     andFilter.and(new EqualsFilter("objectClass", ldapServerProperties.getGroupObjectClass()));
     andFilter.and(new EqualsFilter(ldapServerProperties.getGroupNamingAttr(), groupName));
-    String baseDn = ldapServerProperties.getGroupBase();
-    if (baseDn == null) {
-      baseDn = ldapServerProperties.getBaseDN();
-    }
+    String baseDn = ldapServerProperties.getBaseDN();
     ldapTemplate.search(baseDn, andFilter.encode(), new ContextMapper() {
 
       public Object mapFromContext(Object ctx) {


Mime
View raw message