[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -211,7 +211,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
if (this.organization.canEditAnyCollection) {
comp.collectionIds = cipher.collectionIds;
comp.collections = this.vaultFilterComponent.collections.fullList.filter(
(c) => !c.readOnly
(c) => !c.readOnly && c.id != null
);
}
comp.organization = this.organization;
@ -230,7 +230,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
component.type = this.type;
if (this.organization.canEditAnyCollection) {
component.collections = this.vaultFilterComponent.collections.fullList.filter(
(c) => !c.readOnly
(c) => !c.readOnly && c.id != null
);
}
if (this.collectionId != null) {
@ -285,7 +285,7 @@ export class OrganizationVaultComponent implements OnInit, OnDestroy {
component.organizationId = this.organization.id;
if (this.organization.canEditAnyCollection) {
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