mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 05:59:21 +03:00
revert decrypt button enabling; allow to select sign key
This commit is contained in:
parent
12f619bda7
commit
412ba464c8
5 changed files with 129 additions and 37 deletions
|
|
@ -83,10 +83,10 @@
|
|||
|
||||
if (0 === aResult.length && Utils.isNonEmptyArray(aRecipients))
|
||||
{
|
||||
aResult = _.compact(_.flatten(_.map(aRecipients, function (sEmail) {
|
||||
var oKey = sEmail ? self.findPrivateKeyByEmailNotNative(sEmail) : null;
|
||||
return oKey ? (bReturnWrapKeys ? [oKey] : oKey.getNativeKeys()) : [null];
|
||||
}), true));
|
||||
aResult = _.uniq(_.compact(_.flatten(_.map(aRecipients, function (sEmail) {
|
||||
var aKeys = sEmail ? self.findAllPrivateKeysByEmailNotNative(sEmail) : null;
|
||||
return aKeys ? (bReturnWrapKeys ? aKeys : _.flatten(_.map(aKeys, function (oKey) { return oKey.getNativeKeys(); }), true)) : [null];
|
||||
}), true)), function (oKey) { return oKey.id; });
|
||||
}
|
||||
|
||||
return aResult;
|
||||
|
|
@ -114,6 +114,28 @@
|
|||
}) || null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sEmail
|
||||
* @return {?}
|
||||
*/
|
||||
PgpUserStore.prototype.findAllPublicKeysByEmailNotNative = function (sEmail)
|
||||
{
|
||||
return _.filter(this.openpgpkeysPublic(), function (oItem) {
|
||||
return oItem && -1 !== oItem.emails.indexOf(sEmail);
|
||||
}) || null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sEmail
|
||||
* @return {?}
|
||||
*/
|
||||
PgpUserStore.prototype.findAllPrivateKeysByEmailNotNative = function (sEmail)
|
||||
{
|
||||
return _.filter(this.openpgpkeysPrivate(), function (oItem) {
|
||||
return oItem && -1 !== oItem.emails.indexOf(sEmail);
|
||||
}) || null;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string} sEmail
|
||||
* @param {string=} sPassword
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue