fix(web): remove checking for MFA permissions as all users are permitted to MFA

This commit is contained in:
Karol Sójko
2022-11-16 10:26:59 +01:00
parent 7d8e212cfe
commit ea40427e67
7 changed files with 3 additions and 45 deletions

View File

@@ -1035,10 +1035,6 @@ export class SNApplication implements ApplicationInterface, AppGroupManagedAppli
}
}
public isMfaFeatureAvailable(): boolean {
return this.mfaService.isMfaFeatureAvailable()
}
public async isMfaActivated(): Promise<boolean> {
return this.mfaService.isMfaActivated()
}

View File

@@ -3,7 +3,6 @@ import { SettingName } from '@standardnotes/settings'
import { SNSettingsService } from '../Settings'
import { PureCryptoInterface } from '@standardnotes/sncrypto-common'
import { SNFeaturesService } from '../Features/FeaturesService'
import { FeatureIdentifier } from '@standardnotes/features'
import { AbstractService, InternalEventBusInterface, SignInStrings } from '@standardnotes/services'
export class SNMfaService extends AbstractService {
@@ -47,17 +46,6 @@ export class SNMfaService extends AbstractService {
return await this.settingsService.deleteSetting(SettingName.MfaSecret)
}
isMfaFeatureAvailable(): boolean {
const feature = this.featuresService.getUserFeature(FeatureIdentifier.TwoFactorAuth)
// If the feature is not present in the collection, we don't want to block it
if (feature == undefined) {
return false
}
return feature.no_expire === true || (feature.expires_at ?? 0) > Date.now()
}
override deinit(): void {
;(this.settingsService as unknown) = undefined
;(this.crypto as unknown) = undefined