Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-11497] If an org has only one collection, check it by default #10806

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions libs/angular/src/vault/components/add-edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,10 @@
this.collections = this.writeableCollections?.filter(
(c) => c.organizationId === this.cipher.organizationId,
);
// If there's only one collection, check it by default
if (this.collections.length === 1) {

Check warning on line 618 in libs/angular/src/vault/components/add-edit.component.ts

View check run for this annotation

Codecov / codecov/patch

libs/angular/src/vault/components/add-edit.component.ts#L618

Added line #L618 was not covered by tests
(this.collections[0] as any).checked = true;
}

Check warning on line 620 in libs/angular/src/vault/components/add-edit.component.ts

View check run for this annotation

Codecov / codecov/patch

libs/angular/src/vault/components/add-edit.component.ts#L620

Added line #L620 was not covered by tests
const org = await this.organizationService.get(this.cipher.organizationId);
if (org != null) {
this.cipher.organizationUseTotp = org.useTotp;
Expand Down
Loading