1
0
mirror of https://github.com/bitwarden/directory-connector synced 2025-12-15 07:43:27 +00:00

Merge pull request #107 from bitwarden/fix-ad-not-removing-users

Fix AD sync not overwriting removed users
This commit is contained in:
Thomas Rittson
2021-04-01 06:48:32 +10:00
committed by GitHub

View File

@@ -57,7 +57,8 @@ export class SyncService {
this.flattenUsersToGroups(groups, groups); this.flattenUsersToGroups(groups, groups);
} }
if (test || ((groups == null || groups.length === 0) && (users == null || users.length === 0))) { if (test || (!syncConfig.overwriteExisting &&
(groups == null || groups.length === 0) && (users == null || users.length === 0))) {
if (!test) { if (!test) {
await this.saveSyncTimes(syncConfig, now); await this.saveSyncTimes(syncConfig, now);
} }