Fixes issue with changing local passcode; disables passcode option for ephemeral sessions.

This commit is contained in:
Mo Bitar
2018-04-29 12:24:23 -05:00
parent a073eaa1ce
commit abb9521472
3 changed files with 14 additions and 5 deletions

View File

@@ -26,6 +26,8 @@ class AccountMenu {
return authManager.user || passcodeManager.hasPasscode();
}
$scope.canAddPasscode = !authManager.isEphemeralSession();
$scope.syncStatus = syncManager.syncStatus;
$scope.newPasswordData = {};

View File

@@ -73,7 +73,10 @@ class StorageManager {
}
this.itemsStorageMode = mode;
this.storage.clear();
if(newStorage !== this.storage) {
// Only clear if this.storage isn't the same reference as newStorage
this.storage.clear();
}
this.storage = newStorage;
if(mode == StorageManager.FixedEncrypted) {

View File

@@ -128,11 +128,15 @@
.panel-section
%h3.title.panel-row Passcode Lock
%div{"ng-if" => "!hasPasscode()"}
.panel-row{"ng-if" => "!formData.showPasscodeForm"}
.button.info{"ng-click" => "addPasscodeClicked(); $event.stopPropagation();"}
.label Add Passcode
%div{"ng-if" => "canAddPasscode"}
.panel-row{"ng-if" => "!formData.showPasscodeForm"}
.button.info{"ng-click" => "addPasscodeClicked(); $event.stopPropagation();"}
.label Add Passcode
%p Add an app passcode to lock the app and encrypt on-device key storage.
%p Add an app passcode to lock the app and encrypt on-device key storage.
%div{"ng-if" => "!canAddPasscode"}
%p Adding a passcode is not supported in temporary sessions. Please sign out, then sign back in with the "Stay signed in" option checked.
%form{"ng-if" => "formData.showPasscodeForm", "ng-submit" => "submitPasscodeForm()"}
%input.form-control{:type => 'password', "ng-model" => "formData.passcode", "placeholder" => "Passcode", "sn-autofocus" => "true", "should-focus" => "true"}