mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-18 01:03:22 +00:00
tweaks for ldap
This commit is contained in:
@@ -21,8 +21,14 @@ namespace Bit.Core.Models
|
||||
|
||||
public DirectoryEntry GetDirectoryEntry()
|
||||
{
|
||||
var entry = new DirectoryEntry(ServerPath, Username, Password.DecryptToString(), AuthenticationTypes.None);
|
||||
return entry;
|
||||
if(Password == null && string.IsNullOrWhiteSpace(Username))
|
||||
{
|
||||
return new DirectoryEntry(ServerPath);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new DirectoryEntry(ServerPath, Username, Password.DecryptToString(), AuthenticationTypes.None);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user