1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-21 11:35:34 +01:00

[AC-1338] fix: filter out unassigned from cipher create/edit/clone (#5238)

This commit is contained in:
Andreas Coroiu 2023-04-21 10:30:30 +02:00 committed by GitHub
parent 6597323393
commit 315c4ffc76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -558,7 +558,7 @@ export class VaultComponent implements OnInit, OnDestroy {
this.collectionsModalRef,
(comp) => {
comp.collectionIds = cipher.collectionIds;
comp.collections = currCollections.filter((c) => !c.readOnly && c.id != null);
comp.collections = currCollections.filter((c) => !c.readOnly && c.id != Unassigned);
comp.organization = this.organization;
comp.cipherId = cipher.id;
comp.onSavedCollections.pipe(takeUntil(this.destroy$)).subscribe(() => {
@ -571,7 +571,7 @@ export class VaultComponent implements OnInit, OnDestroy {
async addCipher() {
const collections = (await firstValueFrom(this.vaultFilterService.filteredCollections$)).filter(
(c) => !c.readOnly && c.id != null
(c) => !c.readOnly && c.id != Unassigned
);
await this.editCipher(null, (comp) => {
@ -644,7 +644,7 @@ export class VaultComponent implements OnInit, OnDestroy {
async cloneCipher(cipher: CipherView) {
const collections = (await firstValueFrom(this.vaultFilterService.filteredCollections$)).filter(
(c) => !c.readOnly && c.id != null
(c) => !c.readOnly && c.id != Unassigned
);
await this.editCipher(cipher, (comp) => {