1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00: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

View File

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