1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-27 22:11:38 +01:00

[PM-15557] Log the Cipher_ClientViewed event when opening the VaultItemDialog (#12669)

This commit is contained in:
Shane Melton 2025-01-06 08:42:38 -08:00 committed by GitHub
parent e75a38c438
commit 828a7fe339
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,9 +9,11 @@ import { map } from "rxjs/operators";
import { CollectionView } from "@bitwarden/admin-console/common";
import { ApiService } from "@bitwarden/common/abstractions/api.service";
import { EventCollectionService } from "@bitwarden/common/abstractions/event/event-collection.service";
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abstractions";
import { EventType } from "@bitwarden/common/enums";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service";
@ -237,6 +239,7 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
private premiumUpgradeService: PremiumUpgradePromptService,
private cipherAuthorizationService: CipherAuthorizationService,
private apiService: ApiService,
private eventCollectionService: EventCollectionService,
) {
this.updateTitle();
}
@ -257,6 +260,13 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
[this.params.activeCollectionId],
this.params.isAdminConsoleAction,
);
await this.eventCollectionService.collect(
EventType.Cipher_ClientViewed,
this.cipher.id,
false,
this.cipher.organizationId,
);
}
this.performingInitialLoad = false;