1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 06:13:38 +00:00

[EC-267] Remove unassigned from lists it is not suppsed to be in (#3102)

* fix: remove unassigned from lists

* fix: remove unnecessary filter
This commit is contained in:
Andreas Coroiu
2022-07-19 08:29:58 +02:00
committed by GitHub
parent 4d5df858e9
commit a302f08a7c

View File

@@ -211,7 +211,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
if (this.organization.canEditAnyCollection) { if (this.organization.canEditAnyCollection) {
comp.collectionIds = cipher.collectionIds; comp.collectionIds = cipher.collectionIds;
comp.collections = this.vaultFilterComponent.collections.fullList.filter( comp.collections = this.vaultFilterComponent.collections.fullList.filter(
(c) => !c.readOnly (c) => !c.readOnly && c.id != null
); );
} }
comp.organization = this.organization; comp.organization = this.organization;
@@ -230,7 +230,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
component.type = this.type; component.type = this.type;
if (this.organization.canEditAnyCollection) { if (this.organization.canEditAnyCollection) {
component.collections = this.vaultFilterComponent.collections.fullList.filter( component.collections = this.vaultFilterComponent.collections.fullList.filter(
(c) => !c.readOnly (c) => !c.readOnly && c.id != null
); );
} }
if (this.collectionId != null) { if (this.collectionId != null) {
@@ -285,7 +285,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
component.organizationId = this.organization.id; component.organizationId = this.organization.id;
if (this.organization.canEditAnyCollection) { if (this.organization.canEditAnyCollection) {
component.collections = this.vaultFilterComponent.collections.fullList.filter( component.collections = this.vaultFilterComponent.collections.fullList.filter(
(c) => !c.readOnly (c) => !c.readOnly && c.id != null
); );
} }
// Regardless of Admin state, the collection Ids need to passed manually as they are not assigned value // Regardless of Admin state, the collection Ids need to passed manually as they are not assigned value