mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-16 08:14:01 +00:00
force get groups if there are any users
This commit is contained in:
@@ -46,18 +46,18 @@ namespace Bit.Core.Services
|
|||||||
throw new ApplicationException("No configuration for sync.");
|
throw new ApplicationException("No configuration for sync.");
|
||||||
}
|
}
|
||||||
|
|
||||||
List<GroupEntry> groups = null;
|
|
||||||
if(SettingsService.Instance.Sync.SyncGroups)
|
|
||||||
{
|
|
||||||
groups = await GetGroupsAsync(force);
|
|
||||||
}
|
|
||||||
|
|
||||||
List<UserEntry> users = null;
|
List<UserEntry> users = null;
|
||||||
if(SettingsService.Instance.Sync.SyncUsers)
|
if(SettingsService.Instance.Sync.SyncUsers)
|
||||||
{
|
{
|
||||||
users = await GetUsersAsync(force);
|
users = await GetUsersAsync(force);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<GroupEntry> groups = null;
|
||||||
|
if(SettingsService.Instance.Sync.SyncGroups)
|
||||||
|
{
|
||||||
|
groups = await GetGroupsAsync(force || users.Any());
|
||||||
|
}
|
||||||
|
|
||||||
return new Tuple<List<GroupEntry>, List<UserEntry>>(groups, users);
|
return new Tuple<List<GroupEntry>, List<UserEntry>>(groups, users);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user