mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +00:00
[AC-1338] fix: filter out unassigned from cipher create/edit/clone (#5238)
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user