Github user mike-jumper commented on a diff in the pull request:

    
https://github.com/apache/incubator-guacamole-client/pull/131#discussion_r106820788
  
    --- Diff: 
extensions/guacamole-auth-ldap/src/main/java/org/apache/guacamole/auth/ldap/user/UserService.java
 ---
    @@ -88,6 +88,7 @@ private void putAllUsers(Map<String, User> users, 
LDAPConnection ldapConnection,
                 // Set search limits
                 LDAPSearchConstraints constraints = new 
LDAPSearchConstraints();
                 constraints.setMaxResults(confService.getMaxResults());
    +            
constraints.setDereference(confService.getDereferenceAliases());
    --- End diff --
    
    If we keep building a new `LDAPSearchConstraints` object, would it make 
more sense to provide a function which does so within `ConfigurationService`, 
rather than repeatedly calling the same setters on a new 
`LDAPSearchConstraints` prior to each LDAP query?
    
    I'm also not clear on why `setMaxResults()` is only applied here. If it 
should apply universally, then I would lean even more strongly in the direction 
described above. We can abstract away the configuration properties which apply 
to LDAP constraints within the internals of `ConfigurationService` and just 
rely on the service to return an appropriate constraints object.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to