refactor(web): replace SOGoGoogleAuthenticatorEnabled with

SOGoTOTPEnabled

Fixes #5294
This commit is contained in:
Francis Lachapelle
2021-06-16 14:59:02 -04:00
parent 34184aa3fc
commit 20b2fd5e45
11 changed files with 40 additions and 36 deletions
+2 -2
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 2006-2020 Inverse inc.
Copyright (C) 2006-2021 Inverse inc.
This file is part of SOGo.
@@ -120,7 +120,7 @@
- (BOOL) isSuperUser;
- (BOOL) canAuthenticate;
- (NSString *) googleAuthenticatorKey;
- (NSString *) totpKey;
/* resource */
- (BOOL) isResource;
+1 -1
View File
@@ -1129,7 +1129,7 @@
return [authValue boolValue];
}
- (NSString *) googleAuthenticatorKey
- (NSString *) totpKey
{
#if defined(MFA_CONFIG)
NSString *key, *result;
+2 -2
View File
@@ -133,8 +133,8 @@ extern NSString *SOGoWeekStartFirstFullWeek;
- (void) setAnimationMode: (NSString *) newValue;
- (NSString *) animationMode;
- (BOOL) googleAuthenticatorEnabled;
- (void) setGoogleAuthenticatorEnabled: (BOOL) newValue;
- (BOOL) totpEnabled;
- (void) setTotpEnabled: (BOOL) newValue;
- (void) setMailComposeWindow: (NSString *) newValue;
- (NSString *) mailComposeWindow;
+5 -4
View File
@@ -228,6 +228,7 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
@"SOGoReminderEnabled", @"ReminderEnabled",
@"SOGoReminderTime", @"ReminderTime",
@"SOGoRemindWithASound", @"RemindWithASound",
@"SOGoTOTPEnabled", @"SOGoGoogleAuthenticatorEnabled",
nil];
[migratedKeys retain];
}
@@ -567,14 +568,14 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
return [self stringForKey: @"SOGoAnimationMode"];
}
- (BOOL) googleAuthenticatorEnabled
- (BOOL) totpEnabled
{
return [self boolForKey: @"SOGoGoogleAuthenticatorEnabled"];
return [self boolForKey: @"SOGoTOTPEnabled"];
}
- (void) setGoogleAuthenticatorEnabled: (BOOL) newValue
- (void) setTotpEnabled: (BOOL) newValue
{
[self setBool: newValue forKey: @"SOGoGoogleAuthenticatorEnabled"];
[self setBool: newValue forKey: @"SOGoTOTPEnabled"];
}
- (void) setMailComposeWindow: (NSString *) newValue