Browse Source

DeviceTrustCryptoService - don't worry about checking if a device should establish trust or not if the user doesn't have trusted device encryption on (#6010)

pull/6018/head
Jared Snider 2 years ago committed by GitHub
parent
commit
6ec22f9570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      libs/common/src/auth/services/device-trust-crypto.service.implementation.ts

8
libs/common/src/auth/services/device-trust-crypto.service.implementation.ts

@ -46,6 +46,14 @@ export class DeviceTrustCryptoService implements DeviceTrustCryptoServiceAbstrac @@ -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();

Loading…
Cancel
Save