fix(web): remove checking for MFA permissions as all users are permitted to MFA
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user