Skip to content

Commit

Permalink
DeviceTrustCryptoService - don't worry about checking if a device sho…
Browse files Browse the repository at this point in the history
…uld establish trust or not if the user doesn't have trusted device encryption on (#6010)
  • Loading branch information
JaredSnider-Bitwarden authored Aug 10, 2023
1 parent 6f84f4c commit 6ec22f9
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ export class DeviceTrustCryptoService implements DeviceTrustCryptoServiceAbstrac
}

async trustDeviceIfRequired(): Promise<void> {
// This handles the case in which a user has selected to trust a device
// however, their org has turned off TDE after they've made their choice
// They should not see device trusted toast
const supportsDeviceTrust = await this.supportsDeviceTrust();
if (!supportsDeviceTrust) {
return;
}

const shouldTrustDevice = await this.getShouldTrustDevice();
if (shouldTrustDevice) {
await this.trustDevice();
Expand Down

0 comments on commit 6ec22f9

Please sign in to comment.