diff options
author | Ruben Pollan <meskio@sindominio.net> | 2017-07-25 18:56:00 +0200 |
---|---|---|
committer | Ruben Pollan <meskio@sindominio.net> | 2017-07-27 12:48:58 +0200 |
commit | 93afdb4d935d504356adc662426a70cd8b575133 (patch) | |
tree | 574245d90e6b18bf1e28925ea373a3163f4a089b /web-ui/app/js/mail_view | |
parent | 1359e610bb73f0a8ae476efd4b09d389ee501f9c (diff) |
[feat] display the mixnet status on incomming emails
Add support for X-Leap-Mixnet header.
Diffstat (limited to 'web-ui/app/js/mail_view')
-rw-r--r-- | web-ui/app/js/mail_view/ui/mail_view.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js index 029707c1..48672c9a 100644 --- a/web-ui/app/js/mail_view/ui/mail_view.js +++ b/web-ui/app/js/mail_view/ui/mail_view.js @@ -51,6 +51,7 @@ define( data.mail.security_casing = data.mail.security_casing || {}; signed = this.checkSigned(data.mail); encrypted = this.checkEncrypted(data.mail); + mixnet = this.checkMixnet(data.mail); attachments = data.mail.attachments.map(function (attachment) { attachment.received = true; return attachment; @@ -68,6 +69,7 @@ define( ident: data.mail.ident, tags: data.mail.tags, encryptionStatus: encrypted, + mixnetStatus: mixnet, signatureStatus: signed, attachments: attachments })); @@ -186,6 +188,21 @@ define( return SIGNED_FLAG; }; + this.checkMixnet = function(mail) { + + var MIXNET_FLAG = { + cssClass: 'security-status__label--mixnet', + label: 'mixnet', + tooltipText: 'mixnet-label-tooltip' + }; + + if(_.any(mail.security_casing.mixnet, function(mixnet) { return mixnet.state === 'valid'; })) { + return MIXNET_FLAG; + } + + return null; + }; + this.isNotTrusted = function(mail){ return _.any(mail.security_casing.imprints, function(imprint) { if(_.isNull(imprint.seal)){ |