1
0
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:
Kyle Spearrin
2018-05-08 15:11:16 -04:00
parent 9644d95b9b
commit 445c3f220a
2 changed files with 7 additions and 8 deletions

View File

@@ -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();

View File

@@ -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);
}