1
0
mirror of http://git.whoc.org.uk/git/password-manager.git synced 2025-10-25 17:47:34 +02:00

Cleaned’ up user unlock feature

This commit is contained in:
Giulio Cesare Solaroli
2015-09-23 13:43:59 +02:00
parent 7ca31faa28
commit 6ad0024600
3 changed files with 10 additions and 8 deletions

View File

@@ -275,6 +275,7 @@ Clipperz.PM.DataModel.EncryptedRemoteObject.prototype = MochiKit.Base.update(nul
return innerDeferredResult;
}, this)));
deferredResult.addErrbackPass(MochiKit.Base.method(this, 'deleteAllCleanTextData'));
deferredResult.releaseLock(deferredLock);
deferredResult.callback();

View File

@@ -181,7 +181,7 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
return this._getPassphraseFunction;
},
'setPassphraseFunction': function(aFunction) {
'setPassphraseFunction': function (aFunction) {
this._getPassphraseFunction = aFunction;
},
@@ -400,6 +400,11 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.User, Object, {
], {trace:false});
},
'unlock': function (aPassphraseDelegate) {
this.setPassphraseFunction(aPassphraseDelegate);
return this.getPreferences(); // TODO: make this more explicit.
},
//-------------------------------------------------------------------------
'logout': function () {