mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-15 15:53:41 +00:00
base path for deleted objects
This commit is contained in:
@@ -39,6 +39,12 @@ namespace Bit.Core.Models
|
||||
return GetDirectoryEntry(path);
|
||||
}
|
||||
|
||||
public DirectoryEntry GetBasePathDirectoryEntry()
|
||||
{
|
||||
var path = Path.Substring(Path.IndexOf("dc=", StringComparison.InvariantCultureIgnoreCase));
|
||||
return GetDirectoryEntry(path);
|
||||
}
|
||||
|
||||
public DirectoryEntry GetDirectoryEntry(string path = null)
|
||||
{
|
||||
if(Password == null && string.IsNullOrWhiteSpace(Username))
|
||||
|
||||
@@ -259,7 +259,7 @@ namespace Bit.Core.Services
|
||||
// Deleted users
|
||||
if(SettingsService.Instance.Server.Type == DirectoryType.ActiveDirectory)
|
||||
{
|
||||
var deletedEntry = SettingsService.Instance.Server.Ldap.GetDirectoryEntry();
|
||||
var deletedEntry = SettingsService.Instance.Server.Ldap.GetBasePathDirectoryEntry();
|
||||
var deletedFilter = BuildBaseFilter(SettingsService.Instance.Sync.Ldap.UserObjectClass, "(isDeleted=TRUE)");
|
||||
deletedFilter = BuildRevisionFilter(deletedFilter, force, SettingsService.Instance.LastUserSyncDate);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user