Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Commit

Permalink
Set search index for limited collection org users (#983)
Browse files Browse the repository at this point in the history
  • Loading branch information
MGibson1 authored May 19, 2021
1 parent 45c31aa commit 1c5ce23
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/app/organizations/vault/ciphers.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ export class CiphersComponent extends BaseCiphersComponent {
}

async load(filter: (cipher: CipherView) => boolean = null) {
if (!this.organization.canManageAllCollections) {
await super.load(filter, this.deleted);
return;
if (this.organization.canManageAllCollections) {
this.accessEvents = this.organization.useEvents;
this.allCiphers = await this.cipherService.getAllFromApiForOrganization(this.organization.id);
} else {
this.allCiphers = (await this.cipherService.getAllDecrypted()).filter(c => c.organizationId === this.organization.id);
}
this.accessEvents = this.organization.useEvents;
this.allCiphers = await this.cipherService.getAllFromApiForOrganization(this.organization.id);
await this.searchService.indexCiphers(this.organization.id, this.allCiphers);
await this.applyFilter(filter);
this.loaded = true;
Expand All @@ -63,7 +63,7 @@ export class CiphersComponent extends BaseCiphersComponent {
}

async search(timeout: number = null) {
super.search(timeout, this.allCiphers);
await super.search(timeout, this.allCiphers);
}
events(c: CipherView) {
this.onEventsClicked.emit(c);
Expand Down

0 comments on commit 1c5ce23

Please sign in to comment.