mirror of
https://github.com/nextcloud/passman.git
synced 2024-11-15 12:32:46 +08:00
Fixed foldermoving failing because encrypted credential was passed
Signed-off-by: fnuesse <felix.nuesse@t-online.de>
This commit is contained in:
parent
2ac1b17bfb
commit
098d1ca5d4
3 changed files with 10 additions and 1 deletions
|
@ -468,7 +468,7 @@
|
|||
};
|
||||
|
||||
$rootScope.$on('updateFolderInMainList', function (evt, updated_credential) {
|
||||
|
||||
CredentialService.decryptCredential(updated_credential);
|
||||
for (var i = 0; i < $scope.active_vault.credentials.length; i++) {
|
||||
if($scope.active_vault.credentials[i].guid === updated_credential.guid){
|
||||
$scope.active_vault.credentials[i]=updated_credential;
|
||||
|
|
|
@ -49,6 +49,11 @@
|
|||
};
|
||||
|
||||
scope.save = function() {
|
||||
while(scope.currentFolder.includes('//')){
|
||||
_credential.folderpath=_credential.folderpath.replace("//", "/");
|
||||
}
|
||||
scope.credential.folderpath = scope.currentFolder;
|
||||
|
||||
CredentialService.updateCredential(scope.credential).then(function (updated_credential) {
|
||||
NotificationService.showNotification($translate.instant('folderpath.moved'), 5000);
|
||||
$rootScope.$broadcast('updateFolderInMainList', updated_credential);
|
||||
|
|
|
@ -49,6 +49,10 @@ angular.module('passmanApp')
|
|||
var _credential = CredentialList[i];
|
||||
|
||||
if (_credential.folderpath !== null) {
|
||||
while(_credential.folderpath.includes('//')){
|
||||
_credential.folderpath=_credential.folderpath.replace("//", "/");
|
||||
}
|
||||
console.log(_credential.folderpath);
|
||||
if (String(_credential.folderpath).startsWith(String($scope.currentFolder)) || update) {
|
||||
if ($scope.FolderList.indexOf(_credential.folderpath) <= -1) {
|
||||
$scope.FolderList.push(_credential.folderpath);
|
||||
|
|
Loading…
Reference in a new issue