1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-11 05:43:26 +00:00

no current user binding

This commit is contained in:
Kyle Spearrin
2018-05-01 14:25:54 -04:00
parent e74b99ec65
commit bbcc65f149

View File

@@ -323,14 +323,10 @@ export class LdapDirectoryService implements DirectoryService {
url: url.toLowerCase(), url: url.toLowerCase(),
}); });
let user: string = null; const user = this.dirConfig.username == null || this.dirConfig.username.trim() === '' ? null :
let pass: string = null; this.dirConfig.username;
if (!this.dirConfig.currentUser) { const pass = this.dirConfig.password == null || this.dirConfig.password.trim() === '' ? null :
user = this.dirConfig.username == null || this.dirConfig.username.trim() === '' ? null : this.dirConfig.password;
this.dirConfig.username;
pass = this.dirConfig.password == null || this.dirConfig.password.trim() === '' ? null :
this.dirConfig.password;
}
this.client.bind(user, pass, (err) => { this.client.bind(user, pass, (err) => {
if (err != null) { if (err != null) {