mirror of
https://github.com/bitwarden/directory-connector
synced 2025-12-22 03:03:22 +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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const anyG = (g as any);
|
||||||
|
anyG.users = [];
|
||||||
for (const uid of g.userMemberExternalIds) {
|
for (const uid of g.userMemberExternalIds) {
|
||||||
if (userMap.has(uid)) {
|
if (userMap.has(uid)) {
|
||||||
if ((g as any).users == null) {
|
anyG.users.push(userMap.get(uid));
|
||||||
(g as any).users = [];
|
} else {
|
||||||
}
|
anyG.users.push(uid);
|
||||||
(g as any).users.push(userMap.get(uid));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((g as any).users != null) {
|
this.sort(anyG.users);
|
||||||
this.sort((g as any).users);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
resolve();
|
resolve();
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ 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 || ((groups == null || groups.length === 0) && (users == null || users.length === 0))) {
|
||||||
if (!test) {
|
if (!test) {
|
||||||
await this.saveSyncTimes(syncConfig, now);
|
await this.saveSyncTimes(syncConfig, now);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user