import javax.naming.ldap.LdapName;
import javax.transaction.TransactionManager;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
import org.argeo.naming.LdapAttrs;
import org.osgi.framework.Filter;
import org.osgi.service.useradmin.Role;
* and an open transaction for write access.
*/
public class LdapUserAdmin extends AbstractUserDirectory {
- private final static Log log = LogFactory.getLog(LdapUserAdmin.class);
-
private InitialLdapContext initialLdapContext = null;
public LdapUserAdmin(Dictionary<String, ?> properties) {
// tls.close();
initialLdapContext.close();
} catch (NamingException e) {
- log.error("Cannot destroy LDAP user admin", e);
+ e.printStackTrace();
}
}
- @SuppressWarnings("unchecked")
@Override
protected AbstractUserDirectory scope(User user) {
Dictionary<String, Object> credentials = user.getCredentials();
} catch (NameNotFoundException e) {
throw e;
} catch (NamingException e) {
- if (log.isTraceEnabled())
- log.error("Cannot get role: " + name, e);
return null;
}
}
|| objectClassAttr.contains(getUserObjectClass().toLowerCase()))
role = new LdifUser(this, dn, attrs);
else {
- log.warn("Unsupported LDAP type for " + searchResult.getName());
+// log.warn("Unsupported LDAP type for " + searchResult.getName());
continue results;
}
res.add(role);