mirror of
https://github.com/nextcloud/passman.git
synced 2025-10-11 05:56:15 +08:00
Merge branch 'fixLoadingVaultKeySettings'
This commit is contained in:
commit
2c48aab40d
1 changed files with 3 additions and 8 deletions
|
@ -30,10 +30,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
VaultService.getVault($scope.active_vault).then(function (vault) {
|
VaultService.getVault($scope.active_vault).then(function (vault) {
|
||||||
vault.vaultKey = SettingsService.getSetting('defaultVaultPass');
|
vault.vaultKey = VaultService.getActiveVault().vaultKey;
|
||||||
delete vault.credentials;
|
delete vault.credentials;
|
||||||
VaultService.setActiveVault(vault);
|
VaultService.setActiveVault(vault);
|
||||||
console.log(vault);
|
|
||||||
$scope.vault_settings = vault.vault_settings;
|
$scope.vault_settings = vault.vault_settings;
|
||||||
if(!$scope.vault_settings.hasOwnProperty('pwSettings')){
|
if(!$scope.vault_settings.hasOwnProperty('pwSettings')){
|
||||||
$scope.vault_settings.pwSettings = {
|
$scope.vault_settings.pwSettings = {
|
||||||
|
@ -125,10 +124,6 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if ($scope.active_vault) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$rootScope.$on('logout', function () {
|
$rootScope.$on('logout', function () {
|
||||||
$scope.selectedVault = false;
|
$scope.selectedVault = false;
|
||||||
});
|
});
|
||||||
|
@ -189,7 +184,7 @@
|
||||||
var changeCredential = function (index, oldVaultPass, newVaultPass) {
|
var changeCredential = function (index, oldVaultPass, newVaultPass) {
|
||||||
CredentialService.reencryptCredential(_selected_credentials[index].guid, oldVaultPass, newVaultPass).progress(function (data) {
|
CredentialService.reencryptCredential(_selected_credentials[index].guid, oldVaultPass, newVaultPass).progress(function (data) {
|
||||||
$scope.cur_state = data;
|
$scope.cur_state = data;
|
||||||
}).then(function (data) {
|
}).then(function () {
|
||||||
var percent = index / _selected_credentials.length * 100;
|
var percent = index / _selected_credentials.length * 100;
|
||||||
$scope.change_pw = {
|
$scope.change_pw = {
|
||||||
percent: percent,
|
percent: percent,
|
||||||
|
@ -201,7 +196,7 @@
|
||||||
} else {
|
} else {
|
||||||
vault.private_sharing_key = EncryptService.decryptString(angular.copy(vault.private_sharing_key), oldVaultPass);
|
vault.private_sharing_key = EncryptService.decryptString(angular.copy(vault.private_sharing_key), oldVaultPass);
|
||||||
vault.private_sharing_key = EncryptService.encryptString(vault.private_sharing_key, newVaultPass);
|
vault.private_sharing_key = EncryptService.encryptString(vault.private_sharing_key, newVaultPass);
|
||||||
VaultService.updateSharingKeys(vault).then(function (result) {
|
VaultService.updateSharingKeys(vault).then(function () {
|
||||||
$rootScope.$broadcast('logout');
|
$rootScope.$broadcast('logout');
|
||||||
NotificationService.showNotification('Please login with your new vault password', 5000);
|
NotificationService.showNotification('Please login with your new vault password', 5000);
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue