Add an option to enable/disable hash lookup via the LDAP provider.

This commit is contained in:
Anatoly Sablin
2019-12-25 22:51:44 +03:00
parent 84ca8ebbd9
commit 82a538c750
2 changed files with 12 additions and 0 deletions

View File

@@ -159,6 +159,10 @@ public class LdapThreePidProvider extends LdapBackend implements IThreePidProvid
@Override
public Iterable<ThreePidMapping> populateHashes() {
List<ThreePidMapping> result = new ArrayList<>();
if (!getCfg().getIdentity().isLookup()) {
return result;
}
String filter = getCfg().getIdentity().getFilter();
try (LdapConnection conn = getConn()) {