Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Authenticate when disabling browser lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Jan 3, 2024
1 parent 1c6d636 commit ca7ffd6
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions Sources/Brave/Frontend/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -656,11 +656,24 @@ class SettingsViewController: TableViewController {
return Section(
header: .title(Strings.security),
rows: [
.boolRow(
title: Strings.Privacy.browserLock,
Row(
text: Strings.Privacy.browserLock,
detailText: Strings.Privacy.browserLockDescription,
option: Preferences.Privacy.lockWithPasscode,
image: UIImage(braveSystemNamed: "leo.biometric.login")),
image: UIImage(braveSystemNamed: "leo.biometric.login"),
accessory: .view(SwitchAccessoryView(initialValue: Preferences.Privacy.lockWithPasscode.value, valueChange: { isOn in
if isOn {
Preferences.Privacy.lockWithPasscode.value = isOn
} else {
self.askForLocalAuthentication { [weak self] success, error in
if success {
Preferences.Privacy.lockWithPasscode.value = isOn
}
}
}
})),
cellClass: MultilineSubtitleCell.self,
uuid: Preferences.Privacy.lockWithPasscode.key
),
Row(
text: Strings.Login.loginListNavigationTitle,
selection: { [unowned self] in
Expand Down

0 comments on commit ca7ffd6

Please sign in to comment.