Implement a flexible search in LDAP for the REST API controller LdapAuthController. Now we have a hardcoded simple method
protected String buildPersonFilter(String login) {
AndFilter filter = new AndFilter();
filter.and(new EqualsFilter("objectclass", "person"))
.and(new EqualsFilter(ldapUserLoginField, login));
return filter.encode();
}
Which cannot be overridden properly because overriding a Controller with mapping in Spring might be a challenging task.
Suggestion:
Extract this method to a service that will build the filter. Services can be overridden easily in CUBA, therefore, users will be able to create their own filters for LDAP search.
Implement a flexible search in LDAP for the REST API controller
LdapAuthController. Now we have a hardcoded simple methodWhich cannot be overridden properly because overriding a Controller with mapping in Spring might be a challenging task.
Suggestion:
Extract this method to a service that will build the filter. Services can be overridden easily in CUBA, therefore, users will be able to create their own filters for LDAP search.