From e0e69920e92f08ab30a2e0cff3b5f5ca37e2a78d Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Fri, 31 May 2019 15:30:22 -0400 Subject: [PATCH] masterPassOnRestart option for pin locking --- .../Pages/Settings/SettingsPage/SettingsPageViewModel.cs | 4 +++- src/App/Resources/AppResources.Designer.cs | 9 +++++++++ src/App/Resources/AppResources.resx | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs index 4177b8ab2..138636c83 100644 --- a/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs +++ b/src/App/Pages/Settings/SettingsPage/SettingsPageViewModel.cs @@ -207,9 +207,11 @@ namespace Bit.App.Pages { var pin = await _deviceActionService.DisplayPromptAync(AppResources.EnterPIN, AppResources.SetPINDescription, null, AppResources.Submit, AppResources.Cancel, true); - var masterPassOnRestart = true; if(!string.IsNullOrWhiteSpace(pin)) { + var masterPassOnRestart = await _platformUtilsService.ShowDialogAsync( + AppResources.PINRequireMasterPasswordRestart, AppResources.UnlockWithPIN, + AppResources.Yes, AppResources.No); if(masterPassOnRestart) { var encPin = await _cryptoService.EncryptAsync(pin); diff --git a/src/App/Resources/AppResources.Designer.cs b/src/App/Resources/AppResources.Designer.cs index 3a6872353..75aea5d62 100644 --- a/src/App/Resources/AppResources.Designer.cs +++ b/src/App/Resources/AppResources.Designer.cs @@ -2985,6 +2985,15 @@ namespace Bit.App.Resources { } } + /// + /// Looks up a localized string similar to You you want to require unlocking with your master password when the application is restarted?. + /// + public static string PINRequireMasterPasswordRestart { + get { + return ResourceManager.GetString("PINRequireMasterPasswordRestart", resourceCulture); + } + } + /// /// Looks up a localized string similar to Possible Matching Items. /// diff --git a/src/App/Resources/AppResources.resx b/src/App/Resources/AppResources.resx index ddae8f37a..535d60d82 100644 --- a/src/App/Resources/AppResources.resx +++ b/src/App/Resources/AppResources.resx @@ -1573,4 +1573,7 @@ Are you sure you want to exit Bitwarden? + + You you want to require unlocking with your master password when the application is restarted? + \ No newline at end of file