feat(password-recovery): Add password recovery with secret question or secondary email

This commit is contained in:
smizrahi
2022-10-03 08:56:41 +02:00
parent 6931186bba
commit 656807b77d
47 changed files with 1729 additions and 159 deletions
+36
View File
@@ -1638,4 +1638,40 @@ static NSArray *reminderValues = nil;
return results;
}
// Password recovery
- (NSArray *) passwordRecoveryList
{
return [NSArray arrayWithObjects:
SOGoPasswordRecoveryDisabled,
SOGoPasswordRecoveryQuestion,
SOGoPasswordRecoverySecondaryEmail,
nil];
}
- (NSArray *) passwordRecoveryQuestionList
{
return [NSArray arrayWithObjects:
SOGoPasswordRecoveryQuestion1,
SOGoPasswordRecoveryQuestion2,
SOGoPasswordRecoveryQuestion3,
nil];
}
- (NSString *) itemPasswordRecoveryText
{
return [self commonLabelForKey: [NSString stringWithFormat: @"passwordRecovery_%@",
item]];
}
- (BOOL) shouldDisplayPasswordRecovery
{
return [[SOGoSystemDefaults sharedSystemDefaults] isPasswordRecoveryEnabled];
}
- (BOOL) shouldDisplayPasswordSection
{
return [self shouldDisplayPasswordRecovery] || [self shouldDisplayPasswordChange];
}
@end