private InitialLdapContext initialLdapContext = null;
public LdapUserAdmin(Dictionary<String, ?> properties) {
- super(properties);
+ super(null, properties);
try {
Hashtable<String, Object> connEnv = new Hashtable<String, Object>();
connEnv.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
throw new UserDirectoryException("Unsupported LDAP type for " + name);
return res;
} catch (NamingException e) {
- log.error("Cannot get role: "+e.getMessage());
+ log.error("Cannot get role: " + name, e);
return null;
}
}
Attribute objectClassAttr = attrs.get(objectClass.name());
LdapName dn = toDn(searchBase, searchResult);
LdifUser role;
- if (objectClassAttr.contains(getGroupObjectClass()))
+ if (objectClassAttr.contains(getGroupObjectClass())
+ || objectClassAttr.contains(getGroupObjectClass().toLowerCase()))
role = new LdifGroup(this, dn, attrs);
- else if (objectClassAttr.contains(getUserObjectClass()))
+ else if (objectClassAttr.contains(getUserObjectClass())
+ || objectClassAttr.contains(getUserObjectClass().toLowerCase()))
role = new LdifUser(this, dn, attrs);
else {
log.warn("Unsupported LDAP type for " + searchResult.getName());