diff --git a/apps/web/src/app/vault/org-vault/vault.component.ts b/apps/web/src/app/vault/org-vault/vault.component.ts index 616d4db6e9f..37104a9a720 100644 --- a/apps/web/src/app/vault/org-vault/vault.component.ts +++ b/apps/web/src/app/vault/org-vault/vault.component.ts @@ -223,7 +223,6 @@ export class VaultComponent implements OnInit, OnDestroy { ); await this.editCipher(null, (comp) => { - comp.organizationId = this.organization.id; comp.type = this.activeFilter.cipherType; comp.collections = collections; if (this.activeFilter.collectionId) { @@ -257,6 +256,7 @@ export class VaultComponent implements OnInit, OnDestroy { const defaultComponentParameters = (comp: AddEditComponent) => { comp.organization = this.organization; + comp.organizationId = this.organization.id; comp.cipherId = cipherId; // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe comp.onSavedCipher.subscribe(async () => { @@ -301,7 +301,6 @@ export class VaultComponent implements OnInit, OnDestroy { await this.editCipher(cipher, (comp) => { comp.cloneMode = true; comp.collections = collections; - comp.organizationId = this.organization.id; comp.collectionIds = cipher.collectionIds; }); } diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index eca84b661a3..b8258297cc4 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -201,7 +201,7 @@ export class AddEditComponent implements OnInit, OnDestroy { this.ownershipOptions.push({ name: o.name, value: o.id }); } }); - if (!this.allowPersonal) { + if (!this.allowPersonal && this.organizationId == undefined) { this.organizationId = this.defaultOwnerId; } }