1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-12 14:23:32 +00:00

clear vault upon logout. full sync vault upon login.

This commit is contained in:
Kyle Spearrin
2016-09-21 00:04:59 -04:00
parent 8b76668f1f
commit 2e56a956db
7 changed files with 86 additions and 40 deletions

View File

@@ -165,6 +165,17 @@ function initFolderService() {
});
};
FolderService.prototype.clear = function (userId, callback) {
if (!callback || typeof callback !== 'function') {
throw 'callback function required';
}
chrome.storage.local.remove('folders_' + userId, function () {
self.decryptedFolderCache = null;
callback();
});
};
FolderService.prototype.delete = function (id, callback) {
if (!callback || typeof callback !== 'function') {
throw 'callback function required';