1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 16:23:44 +00:00

[PM-13764] - Update Collection Settings (#12734)

* Updating org when collection settings change.
This commit is contained in:
Jared McCannon
2025-01-09 10:32:21 -06:00
committed by GitHub
parent 20c8eda986
commit 3550a904dc
4 changed files with 37 additions and 0 deletions

View File

@@ -231,6 +231,20 @@ export class AppComponent implements OnDestroy, OnInit {
}
break;
}
case "syncOrganizationCollectionSettingChanged": {
const { organizationId, limitCollectionCreation, limitCollectionDeletion } = message;
const organizations = await firstValueFrom(this.organizationService.organizations$);
const organization = organizations.find((org) => org.id === organizationId);
if (organization) {
await this.organizationService.upsert({
...organization,
limitCollectionCreation: limitCollectionCreation,
limitCollectionDeletion: limitCollectionDeletion,
});
}
break;
}
default:
break;
}