mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-05 23:53:21 +00:00
handle group syncs even whenever there are no users
This commit is contained in:
@@ -139,18 +139,17 @@ export class DashboardComponent implements OnInit, OnDestroy {
|
||||
continue;
|
||||
}
|
||||
|
||||
const anyG = (g as any);
|
||||
anyG.users = [];
|
||||
for (const uid of g.userMemberExternalIds) {
|
||||
if (userMap.has(uid)) {
|
||||
if ((g as any).users == null) {
|
||||
(g as any).users = [];
|
||||
}
|
||||
(g as any).users.push(userMap.get(uid));
|
||||
anyG.users.push(userMap.get(uid));
|
||||
} else {
|
||||
anyG.users.push(uid);
|
||||
}
|
||||
}
|
||||
|
||||
if ((g as any).users != null) {
|
||||
this.sort((g as any).users);
|
||||
}
|
||||
this.sort(anyG.users);
|
||||
}
|
||||
}
|
||||
resolve();
|
||||
|
||||
@@ -60,7 +60,7 @@ export class SyncService {
|
||||
this.flattenUsersToGroups(groups, groups);
|
||||
}
|
||||
|
||||
if (test || groups == null || groups.length === 0 || users == null || users.length === 0) {
|
||||
if (test || ((groups == null || groups.length === 0) && (users == null || users.length === 0))) {
|
||||
if (!test) {
|
||||
await this.saveSyncTimes(syncConfig, now);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user